• + 1 comment

    How is this question different from just iteratively removing the smallest elements? I tried the following, and it passes test cases, but fails most of the others.

    List number = new List(); while (arr.Count > 0) { number.Add(arr.Count); arr.RemoveAll(i => i == arr.Min()); } return number;