👩💻 Join our community of thousands of amazing developers!
Leetcode Longest Common Prefix https://leetcode.com/problems/longest-common-prefix/ 1. 나의 풀이 class Solution { public String longestCommonPrefix(String[] strs) { if (strs.length == 1){ return strs[0]; } Arrays.sort(strs, (e1, e2) -> e1.length() - e2.length()); int prefix_index = -1; for(int i = 1; i < strs[0].length() + 1; i++) { String prefix_candidate = strs[0].substring(0, i); boolean i...