Has this simple algorithm question been written incorrectly?
No.13156883 ViewReplyOriginalReport
Quoted By: >>13156926 >>13157029 >>13157571 >>13158041 >>13158058 >>13158310
"Write a method that finds the n-th most rare element in a list. For example:
nth_most_rare([5,4,3,2,1,5,4,3,2,5,4,3,5,4,5])
should return 2. In the list, element 1 occurs once, 2 twice, 3 thrice, 4 four times and 5 five times, making element 1 the most rare element and 2 the second most rare element."
Why would it return 2 unless the method was given the argument 2? Am I retarded, or has a retard written this question?
nth_most_rare([5,4,3,2,1,5,4,3,2,5,4,3,5,4,5])
should return 2. In the list, element 1 occurs once, 2 twice, 3 thrice, 4 four times and 5 five times, making element 1 the most rare element and 2 the second most rare element."
Why would it return 2 unless the method was given the argument 2? Am I retarded, or has a retard written this question?
