We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d4d471b commit 157431eCopy full SHA for 157431e
Kth Largest Element/README.markdown
@@ -40,7 +40,7 @@ Now, all we must do is take the value at index `a.count - k`:
40
a[a.count - k] = a[8 - 4] = a[4] = 9
41
```
42
43
-Of course, if you were looking for the k-th *smallest* element, you'd use `a[k]`.
+Of course, if you were looking for the k-th *smallest* element, you'd use `a[k-1]`.
44
45
## A faster solution
46
0 commit comments