Write a function to find the longest common prefix string amongst an array of strings.
Subscribe to see which companies asked this question
class Solution {
public String longestCommonPrefix(String[] strs) {
if(strs.length == 0)
return "";
if(strs.length == 1)
return strs[