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 has been deleted.
Интересная техника кода
This solution is at least 8 years old....
just renaming the vars makes it much more readable
using var is a bad practice nowdays
This is clever but not best practice. Only code that is clear should be allowed to be considered best practice.
This comment is hidden because it contains spoiler information about the solution
I don't get why people try to make something appear shorter by destroying every naming convention possible and make it impossible to read..
Would be still be clever enough if it wasn't written like this..
brings tears to the eyes. quite lovely!
Could you explain why it has polynomial time complexity and not quadratic O(n^2)?
Sure this code is hard to read and would be better with a bit of effort but I was amazed by the beauty of the solution ! Very clever
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.
This is actually clever. I didn't even think to use recursion.
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...
Would definitely use spaces, new lines and full variable names. This is not easy to read so not sure why this has been upvoted as a best practice. Clever at most.
Loading more items...