6 odpowiedzi
+ 1
Here's my code:
https://code.sololearn.com/c3XI4n4NW7P0/#py
+ 1
Xan that's right, I'm trying so hard to do it, but I have almost nothing knowledge about lists...
+ 1
Xan, it will return both in that example, the problem for me is I don't know how to do it :(
+ 1
Xan thx! I understand now, it works pretty good
0
Can you expand on this, and give some examples of what you mean?
Do you mean that ["hello", "goat", "help"] would return "hel" as being the longest prefix?
0
The problem would be to decide what to do when there are more than one longest common prefixes amongst multiple words in the list.
Can you expand on this, and give some examples of what you mean?
Do you mean that ["hello", "goat", "help", "goal"] could return "hel" or "goa". There is no common longest prefix in that case. Maybe return both in that example?