Hi All,
Given an array of numbers, I want to find out the 2nd largest number in an array. Can anyone help me to solve the problem?
Any help in terms of logic or code would be useful.
Thanks,
Vishal
Hi All,
Given an array of numbers, I want to find out the 2nd largest number in an array. Can anyone help me to solve the problem?
Any help in terms of logic or code would be useful.
Thanks,
Vishal
Iterate through the array keeping track of two largest so far.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.