According to that wikipedia page, f maps index to value, we reverse sort results of f, then h-index (f) = max(min (f(i), i))

```
public class Solution {
public int hIndex(int[] c) {
if (c == null) {
return 0;
}
List<Integer> rsorted = Arrays.stream(c).mapToObj(i->Integer.valueOf(i)).sorted(Collections.reverseOrder()).collect(Collectors.toList());
return IntStream.range(0,rsorted.size()).reduce(0,(hindex,curindex)->Math.max(hindex,Math.min(curindex+1,rsorted.get(curindex))));
}
}
```