This is an interview question I saw online and I am not sure I have correct idea for it.
The problem is here:
Design an algorithm to find the two largest elements in a sequence of n numbers. Number of comparisons need to be n + O(log n)
I think I might choose quick sort and stop when the two largest elements are find? But not 100% sure about it. Anyone has idea about it please share