问题
给你一个整数数组 citations ,其中 citations[i] 表示研究者的第 i 篇论文被引用的次数。计算并返回该研究者的 h 指数。
根据维基百科上 h 指数的定义:h 代表“高引用次数” ,一名科研人员的 h 指数 是指他(她)至少发表了 h 篇论文,并且 至少 有 h 篇论文被引用次数大于等于 h 。如果 h 有多种可能的值,h 指数 是其中最大的那个。

解答
class Solution {public int hIndex(int[] citations) {int tamp = 0;Arrays.sort(citations);for (int i = citations.length - 1; i >= 0; i--) {if (citations[i] > tamp) {tamp++;}}return tamp;}
}
总结
先排序,再由最大值来依次推算拿到最大的H值