Given an array of citation counts sorted in ascending order, return the researcher's h-index: the maximum value h such that the researcher has at least h papers each cited at least h times. Use binary search. Input: an ascending array of citations.
Input: An ascending array of citations.
Output: Integer — the h-index.
Input: [0,1,3,5,6]
Output: 3
Explanation: 3 papers have >= 3 citations.Input: [1,2,100]
Output: 2
Explanation: h-index is 2.Input: [0]
Output: 0
Explanation: No cited papers.1<=n<=10^50<=citations<=1000sorted ascending