Amazon interview question

about the segment trees .