Ad
  • Custom User Avatar

    Instead of sorting in and reversing it, you could sort it from the first time in a descending sort.

  • Custom User Avatar

    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.

  • Custom User Avatar

    I got distracted and thought bin was an int 🤦

  • Custom User Avatar

    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.