Longest common prefix · 가장 긴 공통 전사 prefix
Longest common prefix
Return the longest string that starts every word in the array. For flower, flow, flight it's fl; if there's nothing in common, return "". Start with the first word as a guess and shrink it against each next word until it fits them all.
가장 긴 공통 전처
배열 내 모든 단어의 시작이 되는 가장 긴 문자열을 반환하세요. flower, flow, flight에 대해서는 fl입니다; 공통점이 없으면 ""을 반환하세요. 첫 단어를 추측으로 시작하여 다음 단어마다 축소해 나가며 모두 맞도록 하세요.
Complete longestCommonPrefix(String[] strs) returning the longest prefix shared by every string. Return an empty string if there is none or the array is empty. · longestCommonPrefix(String[] strs)를 완성하여 모든 문자열이 공유하는 가장 긴 전사 prefix를 반환하십시오. 없거나 배열이 비어 있으면 빈 문자열을 반환하십시오.
Click Run to see the output here. · 출력을 보려면 '실행'을 클릭하세요.