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)
master
Yuki Okushi 2 weeks ago committed by GitHub
commit 60f0b30d8e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -104,7 +104,7 @@ code and the unsafe code into two separate phases:
```text ```text
bubble_up(heap, index): bubble_up(heap, index):
let end_index = index; let end_index = index;
while end_index != 0 && heap[end_index] < heap[parent(end_index)]: while end_index != 0 && heap[index] < heap[parent(end_index)]:
end_index = parent(end_index) end_index = parent(end_index)
let elem = heap[index] let elem = heap[index]

Loading…
Cancel
Save