public String longestCommonPrefix(String[] strs) {
        if (strs == null || strs.length == 0) {
        	return "";
        }

        int len = findShortestStr(strs);
        String result = "";
        boolean flag = true;
        for (int i = 0; i < len; i++) {
        	char tmp = strs[0].charAt(i);
        	
        	result += tmp;
        	for (String word: strs) {
        		//System.out.println(word);
        		if (word.charAt(i) != tmp) {
        			result = result.substring(0, i);
        			flag = false;
        			return result;
        		}
        	}
        }
        if (flag) {
        	return result;
        }
        return "";
        
    }