Is it possible to have two h in this problem? please give an example?


  • 6
    Y

    is it possible to have two h in this problem? please give an example?


  • 4

    No, that can't happen.

    Imagine a valid h.

    Since N-h papers have at most h citations, at most h papers have more than h citations. So no higher value h2 can be valid, as we'd need at least h2 papers with at least h2 citations, i.e., more than h papers with more than h citations.

    Since h papers have at least h citations, at most N-h papers have fewer than h citations. So no lower value h2 can be valid, as we'd need N-h2 papers with at most h2 citations, i.e., more than N-h papers with fewer than h citations.


  • 0
    I

    Then I guess the question is wrong .. since it states there could be more than one.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.