from typing import List


class Solution:

    def hIndex(self, citations: List[int]) ->int:
        citations.sort()
        for i in range(len(citations)):
            if citations[i] >= len(citations) - i:
                return len(citations) - i
        return 0

fd2a2b5b045cf47ff9bc077842a84c44ad14108b
<mask token>

<mask token>


class Solution:
    <mask token>

<mask token>


class Solution:

    def hIndex(self, citations: List[int]) ->int:
        citations.sort()
        for i in range(len(citations)):
            if citations[i] >= len(citations) - i:
                return len(citations) - i
        return 0

from typing import List


class Solution:

    def hIndex(self, citations: List[int]) ->int:
        citations.sort()
        for i in range(len(citations)):
            if citations[i] >= len(citations) - i:
                return len(citations) - i
        return 0
