Find the first h index which has the citation value larger or equal to the remaining # of citations.

```
public int hIndex(int[] citations) {
Arrays.sort(citations);
int num = citations.length;
for(int h = 0; h < citations.length; h++){
if(num - h <= citations[h]) return num - h;
}
return 0;
}
```

'''