Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0b60058

Browse files
committed
partition
1 parent993fa53 commit0b60058

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎algorithm/interviews/pocketGem/FindKthFrequency.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,10 @@ public static int getTopKIndex(ArrayList<Entry<Integer, Integer>> entryList, int
143143
returnindex;
144144
}elseif (index +1 >k) {
145145
// Find the result in the left side
146-
returnpartition(entryList,start,index -1,entryList.get(end));
146+
returngetTopKIndex(entryList,start,index -1,k);
147147
}else {
148148
// Find in the right side.
149-
returnpartition(entryList,index +1,end,entryList.get(end));
149+
returngetTopKIndex(entryList,index +1,end,k);
150150
}
151151
}
152152

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp