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.
I like this idea too. the code is very clean
I like the idea, I Too it and replaced array copy with Arrays.asList and subList, which should be better for Performance.
Impotent to notice here this solution isn't performance-wise.
It allocates in memory lots of intermediate arrays. That might be costly and has to be avoided.
Your solution is using a library?
Why people are voting "Best Practice" to a String concat loop?
ну ты гнида
Description says "Don't modify the input arr in your code".
Arrays.sort(arr)
does exactly the opposite.It's possible to solve this problem in O(n*log(n)) time by reversing the keys and values of the second argument, and this is a O(n^2) solution.
It's my solution xD How dare you? Have a nice day
Such finesse! Being new to java myself, I didn't realize it had these tools to make this solution so succinct.
String str = "abc";
is equivalent to:
char data[] = {'a', 'b', 'c'};
(http://docs.oracle.com/javase/8/docs/api/java/lang/String.html)
This comment is hidden because it contains spoiler information about the solution