As reported: Goldman Sachs Associate Superday, round 3 with two VPs (2026): LeetCode 275 H-Index II, followed by puzzles and a design question.
Given citations sorted in ascending order, return the researcher's h-index: the largest h such that at least h papers have at least h citations each. Solve it in logarithmic time.
This is LeetCode 275 — H-Index II.
Example 1
citations = [0,1,3,5,6]
-> 3
Example 2
citations = [1,2,100]
-> 2
Constraints: 1 ≤ n ≤ 10^5; 0 ≤ citations[i] ≤ 1000; sorted ascending.
Code runner format: one JSON value per line: citations (LeetCode's test-case format). Implement hIndex(citations); the harness prints the result as JSON.