Implement Treap