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 solution is at least 8 years old....
using var is a bad practice nowdays
This comment is hidden because it contains spoiler information about the solution
Could you explain why it has polynomial time complexity and not quadratic O(n^2)?
I also thought about this problem.
One solution to deal with it is to remove repeated characters from the original string then test on the new string.
Tried to do this for hours didn't worked... Then I solved it with 35 line of for and if codes,
I should have ss what I wrote back then... know I dont even know what was wrong with it...
Forbidden dark magic Regex
Clever as hell; arguably not best practices, though, since most devs don't know too much Regex and wouldn't be able to debug this.
nice solution
regex bad
What's wrong with Regex? I'd say it's fine to use whatever method as long as it's natively build into javascript (not importing a library) and it's not forbidden by the author.
would break for chars like ?
if you use regex to solve 5th kyu probs on here i dont like u
Excellent solution. I think imperatively, I must spend a year in the temple with the honorable declarative monks.
Very nice !
I wanted to use recursion to solve this. I could have done it using .search() method instead of .match() (don't know which is better).
Loading more items...