Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
There is no test with empty string afaik in Python. Your current code works, did you try printing the input when you got that error to check which input made your code fail?
I guess you added something to ignore empty words, but it's your code which was creating them:
A word can have a single letter, and if a string is not empty it has 0-index char anyway; so this error may occure only if a word is empty string. But how is it possible if code passes all tests, meaning that a given argument is always a valid phrase? maybe an iterpreter issue..
A word can have a single letter and your code tries to access out of that range. Not a kata issue.
P.S.: that wasn't the problem, your problem was your code created empty words.
This comment is hidden because it contains spoiler information about the solution
conversion to set takes some time and set() is called in every iteration.
It's O(n), that's plenty fast.
Never knew that format can be used this way, it's so cool
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
seems too easy for 6 kyu
It's a very straightforward solution, but what if string would be really long? Will have to wait a lot.
everything is interlinked with maths + - * / 😂😑
me too lmao, 1.5 pages of notebook paper with scribbled sequences on it
Yeah, turns out multiplying something by itself multiple times comes in handy. Middle school math is very useful in general.
Loading more items...