class Solution {
public int hIndex(int[] citations) {
int n=citations.length;
int h=n;
for(int i=0;i<n;i++){
if(citations[i]<h){
h--;
}
}
return h;
}
}
[Leetcode H指数Ⅱ] 数组
于 2023-10-29 10:34:07 首次发布