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.
Instead of sorting in and reversing it, you could sort it from the first time in a descending sort.
The description indicates that you should include YourPoints in the ClassPoints List to calculate the average. However, a lot of answers do not include this step, which should be considered incorrect, but they still pass all the tests.
There should at least have a test to invalidate this or this part of the question should be removed since in this cenario it have no meaning.
I got distracted and thought bin was an int 🤦
Take x=1 and y=2 for example, if (x+1 equals y), then it means x and y are consecutive, which is the condition we are verifying.
Some other ways to do the same operation would be:
y-x = 1,
x-y = -1,
y-1 = x.