Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data_structures/binary_tree/treap.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def merge(left: Node | None, right: Node | None) -> Node | None:
"""
if (not left) or (not right): # If one node is None, return the other
return left or right
elif left.prior < right.prior:
elif left.prior > right.prior:
"""
Left will be root because it has more priority
Now we need to merge left's right son and right tree
Expand Down