How would you find the second largest integer in an unsorted array? Write the code.
Anonimo
Two possibilities:- 1) Sort the area and find the second largest ( using mergsort, nlogn complexity 2) just transverse the array and keep two temporary variables storing the smallest and second smallest.