Skip to content · ⁨본문 바로가기⁩

Longest common prefix · ⁨가장 긴 공통 전사 prefix⁩

English

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입니다; 공통점이 없으면 ""을 반환하세요. 첫 단어를 추측으로 시작하여 다음 단어마다 축소해 나가며 모두 맞도록 하세요.

Log in or create account · ⁨로그인 또는 계정 만들기⁩

IGCSE, A-Level & AP