We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c04620 commit 8c30970Copy full SHA for 8c30970
1 file changed
data_structures/binary_tree/treap.py
@@ -65,7 +65,7 @@ def merge(left: Node | None, right: Node | None) -> Node | None:
65
"""
66
if (not left) or (not right): # If one node is None, return the other
67
return left or right
68
- elif left.prior < right.prior:
+ elif left.prior > right.prior:
69
70
Left will be root because it has more priority
71
Now we need to merge left's right son and right tree
0 commit comments