(self, a)
| 3 | |
| 4 | class SegmentTree: |
| 5 | def __init__(self, a): |
| 6 | self.A = a |
| 7 | self.N = len(self.A) |
| 8 | self.st = [0] * ( |
| 9 | 4 * self.N |
| 10 | ) # approximate the overall size of segment tree with array N |
| 11 | if self.N: |
| 12 | self.build(1, 0, self.N - 1) |
| 13 | |
| 14 | def left(self, idx): |
| 15 | """ |