loading…
Write common_prefix(words) returning the longest prefix shared by every word ("" if none).
common_prefix(["flower", "flow", "flight"]) -> "fl"
common_prefix(["dog", "racecar", "car"]) -> ""
Stuck on the idea itself? The strings lesson walks through the pattern from scratch.