Zip tree
The zip tree was introduced as a variant of random binary search tree by Robert Tarjan, Caleb Levy, and Stephen Timmel. Zip trees are similar to max treaps except ranks are generated through a geometric distribution and maintain their max-heap property during insertions and deletions through unzipping and zipping rather than tree rotations. Nodes of the tree contain a distinct, comparable key and a numeric rank. The tree is max heap ordered with respect to the ranks with ties broken in favor of smaller keys. Nodes of the tree must contain distinct keys but allow for duplicate ranks. The rank tie-breaker favoring smaller keys creates a bias in the tree favoring smaller nodes. A slightly modified zip tree variant, zip-zip trees address this bias by introducing a different tie-breaker with a second rank.
The zip tree was introduced as a variant of random binary search tree by Robert Tarjan, Caleb Levy, and Stephen Timmel. Zip trees are similar to max treaps except ranks are generated through a geometric distribution and maintain their max-heap property during insertions and deletions through unzipping and zipping rather than tree rotations. Nodes of the tree contain a distinct, comparable key and a numeric rank. The tree is max heap ordered with respect to the ranks with ties broken in favor of smaller keys. Nodes of the tree must contain distinct keys but allow for duplicate ranks. The rank tie-breaker favoring smaller keys creates a bias in the tree favoring smaller nodes. A slightly modified zip tree variant, zip-zip trees address this bias by introducing a different tie-breaker with a second rank. Then, follow the search path for x in the tree until finding a node u such that u.rank x.key. Keys must be unique so if at any point v.key = x.key, the search stops and no new node is inserted. Once the search for x is complete, x is inserted in place of the node u. The top node of the path P becomes the left child of x and the top node of Q becomes the right child. The parent and child pointers between u and u.parent will be updated accordingly with x, and if u was previously the root node, x becomes the new root.
References
- Zip-Zip Trees: Making Zip Trees More Balanced, Biased, Compact, or Persistent · retrieved 2026-11-18 · rev 1311791948
Cite this reference
MLA "Zip-Zip Trees: Making Zip Trees More Balanced, Biased, Compact, or Persistent." Gila, Ofek; Goodrich, Michael T. 2026-11-18. https://en.wikipedia.org/wiki/ArXiv_(identifier). Accessed 24 November 2026.
Chicago "Zip-Zip Trees: Making Zip Trees More Balanced, Biased, Compact, or Persistent." Gila, Ofek; Goodrich, Michael T. 2026-11-18. https://en.wikipedia.org/wiki/ArXiv_(identifier).
APA Gila, Ofek; Goodrich, Michael T. (2026). Zip-Zip Trees: Making Zip Trees More Balanced, Biased, Compact, or Persistent. Retrieved November 24, 2026, from https://en.wikipedia.org/wiki/ArXiv_(identifier)
- Zip Trees · retrieved 2026-11-18 · rev 1311791948
Cite this reference
MLA "Zip Trees." a b Tarjan, Robert E. 2026-11-18. https://en.wikipedia.org/wiki/ArXiv_(identifier). Accessed 24 November 2026.
Chicago "Zip Trees." a b Tarjan, Robert E. 2026-11-18. https://en.wikipedia.org/wiki/ArXiv_(identifier).
APA a b Tarjan, Robert E. (2026). Zip Trees. Retrieved November 24, 2026, from https://en.wikipedia.org/wiki/ArXiv_(identifier)
Cite this article
MLA
"Zip tree." encyclopegia.org, 2025, https://encyclopegia.org/wiki/zip-tree. Accessed 24 November 2026.
Chicago
"Zip tree." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/zip-tree.
APA
encyclopegia.org. (2025). Zip tree. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/zip-tree
Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON