Python Segment Tree Geeksforgeeks Practice