Algorithm · Harvey · Medium
Problem You are given an integer array citations, where each entry is the number of citations a single paper has received. Your task is to compute the h-index: the largest integer h such that at least h papers have h or more citations. Example Explanation: The array contains five papers. Three of them (the ones with 3, 6, and 5 citations) have at least 3 citations, and no larger h satisfies the condition. Explanation: Only one paper has at least 1 citation (actually all…
Checking your access…