Zipping Segment Trees

Authors Lukas Barth , Dorothea Wagner

Thumbnail PDF


  • Filesize: 0.58 MB
  • 13 pages

Document Identifiers

Author Details

Lukas Barth
  • Karlsruhe Institute of Technology, Germany
Dorothea Wagner
  • Karlsruhe Institute of Technology, Germany

Cite AsGet BibTex

Lukas Barth and Dorothea Wagner. Zipping Segment Trees. In 18th International Symposium on Experimental Algorithms (SEA 2020). Leibniz International Proceedings in Informatics (LIPIcs), Volume 160, pp. 25:1-25:13, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2020)


Stabbing queries in sets of intervals are usually answered using segment trees. A dynamic variant of segment trees has been presented by van Kreveld and Overmars, which uses red-black trees to do rebalancing operations. This paper presents zipping segment trees - dynamic segment trees based on zip trees, which were recently introduced by Tarjan et al. To facilitate zipping segment trees, we show how to uphold certain segment tree properties during the operations of a zip tree. We present an in-depth experimental evaluation and comparison of dynamic segment trees based on red-black trees, weight-balanced trees and several variants of the novel zipping segment trees. Our results indicate that zipping segment trees perform better than rotation-based alternatives.

Subject Classification

ACM Subject Classification
  • Theory of computation → Sorting and searching
  • Information systems → Point lookups
  • Segment Trees
  • Dynamic Segment Trees
  • Zip Trees
  • Data Structures


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Lukas Barth and Dorothea Wagner. Shaving peaks by augmenting the dependency graph. In Proceedings of the Tenth ACM International Conference on Future Energy Systems, pages 181-191. ACM, 2019. URL:
  2. Lukas Barth and Dorothea Wagner. Engineering top-down weight-balanced trees. In 2020 Proceedings of the Twenty-Second Workshop on Algorithm Engineering and Experiments (ALENEX), pages 161-174. SIAM, 2020. URL:
  3. Jon Louis Bentley. Algorithms for Klee’s rectangle problems. Technical report, Department of Computer Science, Carnegie-Mellon University, 1977. Unpublished notes. Google Scholar
  4. Yeim-Kuan Chang and Yung-Chieh Lin. Dynamic segment trees for ranges and prefixes. IEEE Transactions on Computers, 56(6):769-784, 2007. URL:
  5. Mark de Berg, Otfried Cheong, Marc van Kreveld, and Mark Overmars. Computational Geometry. Springer, 2008. URL:
  6. Martin Dietzfelbinger, Torben Hagerup, Jyrki Katajainen, and Martti Penttonen. A reliable randomized algorithm for the closest-pair problem. Journal of Algorithms, 25(1):19-51, 1997. URL:
  7. Stefan Edelkamp, Shahid Jabbar, and Thomas Willhalm. Geometric travel planning. IEEE Transactions on Intelligent Transportation Systems, 6(1):5-16, 2005. URL:
  8. Andreas Gemsa, Martin Nöllenburg, and Ignaz Rutter. Evaluation of labeling strategies for rotating maps. Journal of Experimental Algorithmics (JEA), 21:1-21, 2016. URL:
  9. Johannes Antonius La Poutré. New techniques for the union-find problem. In Proceedings of the first annual ACM-SIAM symposium on Discrete algorithms (SODA), pages 54-63, 1990. Google Scholar
  10. Raimund Seidel and Cecilia R Aragon. Randomized search trees. Algorithmica, 16(4-5):464-497, 1996. URL:
  11. Raimund Seidel and Micha Sharir. Top-down analysis of path compression. SIAM Journal on Computing, 34(3):515-525, 2005. URL:
  12. Robert E Tarjan, Caleb C Levy, and Stephen Timmel. Zip trees. CoRR, abs/1806.06726, 2018. URL:
  13. Robert E Tarjan, Caleb C Levy, and Stephen Timmel. Zip trees. In Workshop on Algorithms and Data Structures (WADS), pages 566-577. Springer, 2019. URL:
  14. Marc J van Kreveld and Mark H Overmars. Union-copy structures and dynamic segment trees. Journal of the ACM (JACM), 40(3):635-652, 1993. URL: