You are given an integer array A. You have to find the second largest element/value in the array or report that no such element exists

Viewed 10

Input Format The first argument is an integer array A.

Output Format Return the second largest element. If no such element exist then return -1.

0 Answers
Related