力扣第14题——最长公共前缀_letcood第14题输出_许小乖的博客-CSDN博客

网站介绍:文章浏览阅读394次。题目:编写一个函public static String longestCommonPrefix(String[] strs) { String pub = ""; int m = strs[0].length(); char temp; //找到数组中长度最短的字符串 for (int i = 0; i < strs.length; i++) { if (strs[i].length() < m) { ..._letcood第14题输出