Important lessons:
Implicit treaps turn array index into a computed property from subtree sizes
Any sequence rearrangement you can do with split and merge in
Lazy propagation works with treaps too (for range updates, reversals)
Random priorities give expected height without complex balancing Treaps are the go-to structure for dynamic sequences. Simpler than splay trees, more flexible than segment trees.