Second Odd Largest in java
You will be given an array and you need to find the second largest odd number and print it to the STDOUT.
Input Format -
you will be taking a number as an input from STDIN which tells about the length of the array. On another line, array elements should be there with single space between them.
Output Format -
you need to print the second largest odd number to the STDOUT.
Sample Test Case:
Sample Input:-7
25 26 7 8 10 11 79
Sample Output -
25
Input Format -
you will be taking a number as an input from STDIN which tells about the length of the array. On another line, array elements should be there with single space between them.
Output Format -
you need to print the second largest odd number to the STDOUT.
Sample Test Case:
Sample Input:-7
25 26 7 8 10 11 79
Sample Output -
25
Comments
Post a Comment