```
public int hIndex(int[] citations) {
for (int h = citations.length; h > 0; h--)
if (citations[citations.length - h] >= h) return h;
return 0;
}
```

Explanation:

If `citations`

is in descending order, you can plot it as follows. The intersection of `citations`

and `y = x`

is the h-index.

Now, the input is given in ascending order. What you need to do is just properly "translate" the array index you visit.

The image credits to the editorial solution of H-Index One.