public class Solution {
public int hIndex(int[] citations) {
Arrays.sort(citations);
int h = 0;
for (int i = 0; i < citations.length; i++) {
int curH = Math.min(citations[i], citations.length - i);
if (curH > h) {
h = curH;
}
}
return h;
}
}
H-Index
最新推荐文章于 2019-08-19 14:46:56 发布