美文网首页
274. H-Index

274. H-Index

作者: 我是你的果果呀 | 来源:发表于2016-12-30 04:53 被阅读0次

    Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index.

    According to the definition of h-index on Wikipedia: "A scientist has index hih of his/herNpapers haveat leasthcitations each, and the otherN − hpapers haveno more thanhcitations each."

    For example, givencitations = [3, 0, 6, 1, 5], which means the researcher has5papers in total and each of them had received3, 0, 6, 1, 5citations respectively. Since the researcher has3papers withat least3citations each and the remaining two withno more than3citations each, his h-index is3.

    Note: If there are several possible values forh, the maximum one is taken as the h-index.

    O(N)      &       O()

    相关文章

      网友评论

          本文标题:274. H-Index

          本文链接:https://www.haomeiwen.com/subject/ldtmvttx.html