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.
clever
can you detail why ?
love this because it's much more easy to comprehend than fluent methods that do lots of clever conversions (which I def ended up doing). I would much rather see this code in a production codebase!
This is a beautiful and clever solution, Great!
In addition, I think is better than the most popular solution (It's on the top)
because this solution takes O(n) and doesn't use a sort method (it would take O(n*lg(n)) like the most popular solution above).
Yes, the code can be improved, but it's already an O(n), isn't it?
Although there is an inner for loop, the outer one is constant.
Ok Thanks!
not static, called on an object
since that object is a string, you're looking for google.com/search?q=java+String.trim
Nice code brother!
I have a doubt (as I am a newbie to Java), why did you use trim() static method at the end? What does it do?
I strongly recommend to avoid loops inside loops
Nice idea, indeed. Of course better algorithm exists, but this solutions is better understood!
The inner loop runs duplicate times, the code can be reduced to O(n)
Very simple and clear. Nice!
This comment is hidden because it contains spoiler information about the solution
i like your solution :).
i think break out for when s.contains(String.valueOf(i)) = true.
Yeah, I've noticed that yet =)
Loading more items...