Segment Tree LeetCode 1622. Fancy Sequence Solution in Java, C++, Python & More | Explanation + Code CoderIndeed June 11, 2026