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.
I am impressed how easily you made it work!
Your code iterates through the entire string before checking the length. And it needs to, because the content matters.
whats the point of checking for the length after iterating through the entire string? sure its a cleaner code but i think it misses the point of checking the validity of the input for an efficient code
bro. this kata took me a full hour... meanwhile we got this solution with a few lines.... lol
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
"color > m" part blew my mind :) amazing solution
You don't have to hyper-optimize 5 kyu katas, my friend.
Logic is easier to understand and follow, but time complexity could grow to O(n^2) in the worst case.
Then wouldn't "h" be a valid input? --> "#H". I guess single char is not a "word"
Wow, absolutely did NOT think of using that function. I should read the docs more...
It would
it will return False
This code won't be able to work the exceptions such as "(([)])"
Awesome!!
Clever!
Loading more items...