Longest Common Prefix Write a function to find the longest common prefix string amongst an array of strings. Show Tags SOLUTION 1: 解法很直观.先找到最小长度,然后逐个字母遍历,同时逐个遍历所有的字符串.注意各种小细节: 1. break的时候,应该返回上一个索引指向的子串. 2. 如果没有break,表示minlen长度的字串就是最大pre. public clas…