Tricks & Leaps with Treaps
• What happens when you insert this into a BST:
1,2,3,4,5,…
• What about a treap?
• Create a sequence of random numbers that’d
create a perfectly balanced Treap for 1,2,3,4,5…
• What should the range of your random priorities
be?  What are bad properties for the random-
number generator?