Skip to content

Commit

Permalink
update n first
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewcmyers committed Dec 13, 2024
1 parent 3d44103 commit f8bb66c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lectures/sorting/qselect_iterative.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ int qselect(int[] a, int l, int r, int n) {
if (n < k) {
r = k;
} else {
l = k;
n -= k - l;
l = k;
}
}
return a[l];
Expand Down

0 comments on commit f8bb66c

Please sign in to comment.