A treap is a randomized binary search tree using random priorities to probabilistically balance the tree.
Fetch the tarball here:
Or grab it from my darcs repository:
darcs get http://repos.siaris.net/perl/Tree-Treap