first commit

This commit is contained in:
2025-11-12 11:34:34 +03:00
commit 29280f3e50
77 changed files with 272246 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
from task15 import longest_common_prefix
import pytest
@pytest.mark.parametrize(
"arg,res",
[
[["flower","flow","flight"], "fl"],
[[" flower"," flow"," flight", "flight "], "fl"],
[["dog","racecar","car"], ""],
[["c","cc","ccc"], "c"],
[[""," "," "], ""],
[[" "," "," "], ""],
[["123"," 1 23","12 3"], "1"],
[["1" for _ in range(100)], "1"],
[["23" + str(i) for i in range(100)], "23"],
[[" ML;", "\t\t\tML", "\n \tML"], "ML"],
[[], ""]
]
)
def test_prefix(arg, res):
assert longest_common_prefix(arg) == res