Find the third largest number in an array using single loop
Answers
Answered by
6
Answer:
Simplest way to solve this question is to first iterate through the array and find first maximum. Store this first maximum as well as its index. Now traverse the whole array finding the second max with the changed condition. Finally traverse the array third time and find the third largest element.
Similar questions