Skip to content

Commit

Permalink
Add time complexity of merge operation to README
Browse files Browse the repository at this point in the history
  • Loading branch information
mhib committed Jan 27, 2024
1 parent ce854e5 commit 5da4a50
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,12 @@ This API is a drop-in replacement of [lazy_priority_queue](https://github.com/ma
| dequeue | O(n) | O(log n) |
| * change_priority | O(1) | o(log n) |
| * delete | O(n) | O(log n) |
| ^ merge | O(1) | O(1) |

`*` Not available in `SimplePairingHeap`

`^` Only available in `SimplePairingHeap`

## Benchmarks
I picked the three fastest pure Ruby priority queue implementations I was aware of for the comparison:

Expand Down

0 comments on commit 5da4a50

Please sign in to comment.