Skip to content

Commit

Permalink
Revise a comment in FindHIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
huangsam committed Nov 12, 2024
1 parent de5df18 commit b770021
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion java/FindHIndex.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public int hIndex(int[] citations) {
frequency[index]++;
}

// Start from right to left for finding maximum index faster
// Go from right to left to find the maximum h-index
int sum = 0;
for (int i = frequency.length - 1; i > 0; i--) {
sum += frequency[i];
Expand Down

0 comments on commit b770021

Please sign in to comment.