Noble Integer
Given an integer array A, find if an integer p exists in the array such that the number of integers greater than p in the array equals to p. Input Format
First and only argument is an integer array A. Output Format
Return 1 if any such integer p is found else return -1. Example Input
Input 1:
Input 2:
Example Output
Output 1:
Output 2:
Example Explanation
Explanation 1:
Explanation 2:
Last updated