We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 628e065 commit 90e72e8Copy full SHA for 90e72e8
top-k-frequent-elements/EGON.swift
@@ -8,7 +8,6 @@ final class MaxHeap<T: Comparable> {
8
heapifyUp(from: heap.count - 1)
9
}
10
11
- @discardableResult
12
func pop() -> T? {
13
guard !heap.isEmpty else {
14
return nil
@@ -84,7 +83,7 @@ struct Item: Comparable {
84
83
let count: Int
85
86
static func < (lhs: Item, rhs: Item) -> Bool {
87
- return lhs.count <= rhs.count
+ return lhs.count < rhs.count
88
89
90
0 commit comments