Amazon Interview Question

about the segment trees .