Find the second largest number in an array
I have an array of three element like [31,23,12], and I want to find the second largest element and its related position without rearranging the array. Example: array = [21,23,34] Second_largest = 23; Position is = 1;
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.