We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d2911cf commit da2085fCopy full SHA for da2085f
Heap/Heap.swift
@@ -212,7 +212,7 @@ extension Heap where T: Equatable {
212
return nodes.index(where: { $0 == node })
213
}
214
215
- /** Removes the first occurrence of a node from the heap. Performance: O(n log n). */
+ /** Removes the first occurrence of a node from the heap. Performance: O(n). */
216
@discardableResult public mutating func remove(node: T) -> T? {
217
if let index = index(of: node) {
218
return remove(at: index)
0 commit comments