Python数据分析入门与实践

<section>课程地址 http://icourse8.com/Python3rumenyushizhan.html </section>

章节详情
第1章 实验环境的搭建
第2章 Numpy入门
第3章 Pandas入门
第4章 Pandas玩转数据
第5章 绘图和可视化之Matplotlib
第6章 绘图和可视化之Seaborn
第7章 数据分析项目实战
第8章 课程总结

class Solution {
    public String longestCommonPrefix(String[] strs) {
     if (strs.length == 1){
            return strs[0];
        }
        StringBuilder sb = new StringBuilder();
        if (strs.length>1) {
            int len = strs[0].length();
            for (int i = 0; i < len; i++) {
                char curr = strs[0].charAt(i);
                for (int j = 1; j < strs.length; j++) {
                    if (strs[j].length()<=i ||strs[j].charAt(i) != curr) {
                        return sb.toString();
                    }
                    if (strs[j].charAt(i) == curr && j == strs.length - 1) {
                        sb.append(curr);
                    }
                }
            }
        }
       return sb.toString();
    }
}

猜你喜欢

转载自blog.51cto.com/14127893/2414047