Amazon interview question

Find the 2nd largest integer for given array

Interview Answer

Anonymous

Feb 28, 2013

Use Bubble Sort twice to get last 2 highest element from an array. O(2N) = O(N)