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.
still not working, the same problem with the last test
My god this comment is in fact very helpful thanks
Please use spoiler flag next time. Your post was visible in the homepage.
This comment is hidden because it contains spoiler information about the solution
The question mark before the end of the string doesn't make that group non-greedy, it only states that the group is optional (the same as {0,1} quantifier).
recursive nightmare :D
kudos if this was on purpose, else i recommend checking out regexp :)
can someone help me calculate Time Complexity for this?
We have 3 loops:
idk how the notation goes, but this is my best guess.
Please help, because i would like to learn :)
hahahaha, thank you for the laugh, this is also one way to do it, just hack the math.random function and manipulate the test cases, hahaha
i can't believe i wasn't able to find this solution...
kudos to you
This solution works but took 9s for the big maze test case (which is close to the 12s limit);
so there is room for optimization, would like to hear some nice suggestions :)
i think i got it, the question mark before string end, makes the group non greedy and thats why it will grab 099 instead of 000099 in the string "foo000099", replacing only last 3 with 100... very clever solution
Why do you say so? It seems to work just fine.
how does this work? please explain
updated last test to only do 50
can you verify if that helps fix the issue?
also there was a note in the description saying the last test was flaky
Loading more items...