Given an unsorted array of unique elements, find the position of a specified elements in array’s sorted form.
Count the number of elements in an unsorted array which are smaller than the given element.
Since the length of all songs is unique, if we count the number of songs which have length less than the length of “Uncle Johny”, we know its position in sorted array.
Constraint on the value of N in this problem is very low so many contestants sorted the array and then did binary search for the length of “Uncle Johny” song in the sorted array. This approach also passes well within time limit.