Given an array of citations sorted in ascending order, compute the researcher's h-index. The h-index is the largest h such that h papers have at least h citations each.
Binary search on the h value. There are n-mid papers from index mid to n-1. h is valid if citations[mid] >= n-mid. Find the smallest mid where this holds.
- lo=0, hi=n-1.
- mid: if citations[mid] >= n-mid: hi=mid (valid h candidate, try smaller index).
- Else: lo=mid+1.
- Answer = n-lo.
- Time Complexity: O(log N)
- Space Complexity: O(1)