public String longestCommonPrefix(String[] strs) {
        if(strs == null || strs.length == 0) return "";
        int min = strs[0].length();
        
        for(int add = 1; add < strs.length; add *= 2) { // I wrote add < min at first = =|||
            for(int i = 0; i + add < strs.length; i += add * 2) {
                int temp = getCommon(strs[i], strs[i+add], min);
                if(temp < min) min = temp;
            }
        }
        if(min == 0) return "";
        return strs[0].substring(0, min);
    }