public String longestCommonPrefix(String[] strs) {
		if (strs == null || strs.length == 0)
			return "";
		if (strs.length == 1)
			return strs[0];
		StringBuilder sb = new StringBuilder();
		for (int i = 0; i < strs[0].length(); ++i) {
			char cur = strs[0].charAt(i);
			for (int j = 1; j < strs.length; ++j) {
				if (i >= strs[j].length() || strs[j].charAt(i) != cur) {
					return sb.toString();
				}
			}
			sb.append(cur);
		}
		return sb.toString();
	}