2D segment tree construction - Henrik-Peters/Multi-Level-Segment-Tree GitHub Wiki The 2D segment tree is constructed from a matrix. For example: