8000 Merge pull request #898 from jpsoultanis/heap-documentation · Gengpp/swift-algorithm-club@f3de99a · GitHub
[go: up one dir, main page]

Skip to content

Commit f3de99a

Browse files
authored
Merge pull request kodecocodes#898 from jpsoultanis/heap-documentation
updating incorrect big-O performance documentation of heap removal
2 parents 0237860 + da2085f commit f3de99a

File tree

1 file changed

+1
-1
lines 8000 changed

1 file changed

+1
-1
lines changed

Heap/Heap.swift

Lines changed: 1 addition & 1 deletion
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)
0