Skip to content

Commit 60f0b30

Browse files
authored
Merge pull request #504 from permannur/exception-safety-binary-heap
Fix typo in exception-safety.md (BinaryHeap::sift_up, user-defined and unsafe code separated)
2 parents 23fc268 + 8184865 commit 60f0b30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/exception-safety.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ code and the unsafe code into two separate phases:
104104
```text
105105
bubble_up(heap, index):
106106
let end_index = index;
107-
while end_index != 0 && heap[end_index] < heap[parent(end_index)]:
107+
while end_index != 0 && heap[index] < heap[parent(end_index)]:
108108
end_index = parent(end_index)
109109
110110
let elem = heap[index]

0 commit comments

Comments
 (0)