- This binary search tree algorithm allows single-pass, top-down treap key insertion.
- Each node has two links (lt is short for less than, gt is short for greater than) and a key.
- The code takes as input a single node (to) and a binary search tree with zero or more nodes (from).
- Initially, to is the binary search tree produced by inserting key k1 into an empty tree.
- Similarly, from is produced by inserting keys k2, k3, ..., kn (in that order) into an empty tree.
- Afterward, to is the tree produced by inserting k1, k2, k3, ..., kn (in that order) into an empty tree.

To receive a hint, submit unfixed code.