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.
O(2n). Not the best one
if the look up times in this solution are constant then it looks good to me
I think this code is much much, faster than the one liners, that are the top solutions for this kata, instead of going through each character in the string, it just does it for the whole string. Well done!
No, it is not. Check in my other solutions. There is a faster one.
5572ms when I submit, test cases work fine
Strictly speaking, since there are only two unique values (guaranteed by the description), set will have len 2, thus O(1) memory consumption.
maybe i'm wrong, but expressions a+bc and cb+a not make sense, how do you think?
great answer, can anybody tell me what is the use of 24 there?
Almost same programm bro
"Regexp Basics"
you are missing the point
In description:
This comment is hidden because it contains spoiler information about the solution
haha, I forgot to simplify it
Without using re, this is probably the most efficient implementation
Very clever, clearly understand the number math of power of 3
Loading more items...