Skip to content

Commit 45df8d4

Browse files
authored
Merge pull request kodecocodes#618 from mrabins/patch-2
Minor Change
2 parents eb8edb1 + 16775c6 commit 45df8d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Kth Largest Element/README.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The following solution is semi-naive. Its time complexity is **O(n log n)** sinc
1212
func kthLargest(a: [Int], k: Int) -> Int? {
1313
let len = a.count
1414
if k > 0 && k <= len {
15-
let sorted = a.sort()
15+
let sorted = a.sorted()
1616
return sorted[len - k]
1717
} else {
1818
return nil

0 commit comments

Comments
 (0)