Skip to content

Commit da2085f

Browse files
author
Joe Soultanis
committed
updaing incorrect big-O performance documentation of heap removal
1 parent d2911cf commit da2085f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Heap/Heap.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ extension Heap where T: Equatable {
212212
return nodes.index(where: { $0 == node })
213213
}
214214

215-
/** Removes the first occurrence of a node from the heap. Performance: O(n log n). */
215+
/** Removes the first occurrence of a node from the heap. Performance: O(n). */
216216
@discardableResult public mutating func remove(node: T) -> T? {
217217
if let index = index(of: node) {
218218
return remove(at: index)

0 commit comments

Comments
 (0)