Logo
IconChallenge
Icon
IconProblem
IconSolutions
IconSubmissions

H-Index

XPChallenge Points: 20
levelLevel: Medium

A scientist’s Research Impact Score (similar to the h-index) is the largest number h such that the scientist has at least h papers, and each of those papers has been cited at least h times.

Write a function that, given an array citations where citations[i] is the number of times the i-th paper was cited, returns this score

Example 1:

Input: citations = [3,0,6,1,5]

Output: 3

Explanation:

There are 3 papers with at least 3 citations each (the papers with 3, 5, and 6 citations). So the research impact score is 3.

Example 2:

Input: citations = [1,3,1]

Output: 1

Explanation:

Only 1 paper has at least 1 citation. Thus, the research impact score is 1.

to Continue
like
dislike

Accepted:

Submission:

IconReport an issue
Icon
IconCode
IconYou need toto run or submitYou need toto run or submit
IconTest Case
IconTest Result