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 has this been voted as best practice?
O(NlogN) insted of linear, for no reason...
You don't want to sort the array, you only want the max or min value of an array, just it.
This comment is hidden because it contains spoiler information about the solution
Mutates the input array ;-)
The execution time of the sorting function though...
Approved! Thanks, dude!
C++-Translation kumited!
Please check it and approve! Thanks. ;)
And dont hesitate to ask, if you have questions. :-)
Ah OK thank you! I will try to work it out. It was my first ever comment so didn't know about not raising as an issue. Will know for future!
First of all: Do not create an issue, if you do not know, why you get an exception/error. Issues are for known/proven problems.
The problem in your code is the way you checking for null.
Check it line for line. I think you will find the problem. Otherwise ask again and I will show you. :-)
This comment is hidden because it contains spoiler information about the solution