In a realm where queries do beg, For ranges, sums, or min's subtle leg, There's a tree we must peg, By the name, we call it, Seg! A SegTree, short and fine, Built in logarithmic time line. For range queries, it does shine, Updates too, in no more time. The tree is binary, that's the key, Each node holds data, you'll agree. Leaf nodes store array values, free, While internal nodes combine, you see. With "Seg", data’s plight is meagre, For it handles tasks much eager. In competitive coding, be a leaguer, With the power of the mighty SegTree, the seeker!