Pergunta de entrevista da empresa Autodesk

Segment tree and graph question