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.
Why are square brackets used? Thank you
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I assume it's becuz there's no such test case for this kata.
Brilliant
Love it wish it was mine
I think it is best practice because it produced a concise and understandable solution within the constraints outlined by the problem. The problem never required specific exceptions to be caught.
simple, I like it.
This kata doesn't give you sets.
This comment is hidden because it contains spoiler information about the solution
This is not best practice as you don't catch specific exceptions. This would be poor practice
don't post solutions to the dashboard, anyone can see it, and there's no need for it. i've added the spoiler flag to your comment
This comment is hidden because it contains spoiler information about the solution
I wrote a recursive O(n) implementation, but I think this solution is closer to "best practice". Start with this solution, because it is simple and easy to read, understand, and maintain. If you need faster performance, and only if you need faster performance, profile your code and find the bottleneck. Finally, if this part of the code turns out to be the bottleneck, now you can implement a faster algorithm. As Donald Knuth said, "premature optimization is the root of all evil (or at least most of it) in programming".
I find there are very simple and concise solutions to problems that can be solved with lesser knowledge that is a harder code. This is a nice solution compared to the lengthy method I used with the extent of my knowledge.
Loading more items...