Math 176 - Advanced Data Structures
Homework #5 Answers

1.a. The skip list will look like this:

1.b. If the keys are inserted in a different order, the end result will still be the same.

2.a. After inserting 5 keys, the treap will look like:

2.b. After inserting 10 keys, the treap will look like:

2.c. If the keys were inserted in a different order (but with the same priorities), then the resulting treap would be the same.