Načítání úlohy…
When grouping similar file names, commands, or words, it is often useful to quickly find the beginning they all share. Given a list of strings strs, return the longest prefix that appears at the start of every string. If there is no shared beginning, return an empty string.
["flower", "flow", "flight"]"fl"["dog", "racecar", "car"]""["interview", "internal", "internet"]"inter"def longest_common_prefix(strs: list[str]) -> str:
Přihlaste se, abyste viděli historii odevzdání
Přihlásit sePřihlaste se, abyste mohli použít AI mentora
Přihlásit se["flower","flow","flight"]"fl"["dog","racecar","car"]""["interview","internal","internet"]"inter"["abc"]"abc"["",""]""["flower"]"flower"