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 is not the best approach, since it has to go through the array three times.
Very neat!
I would just return Array.Empty(), since it's a singleton and does not take extra memory on creating a new array.
Nice, but you could have been using Math.Max() and Math.Min(), it would save you like 8 lines of code (and no ugly if/else).
Array.sort
makes in-place operations so inmutability ofages
array is not guaranteed. It implies having side effects after executing function.Duplicate issue
This comment is hidden because it contains spoiler information about the solution
Some basic math:
(x - z * y)/ z = x/z - (y * z)/z = x / z - y
Description is a bit unclear.