Need Advice: Range Queries

I want to start learning about Array Range Queries, and more likely Queries involving between Nodes of Trees. So i do some research and find that, i will have to learn the following things to master it.

before Starting : Since its a big list, need some advice on:

–>How to start(which topics first/last/more important/less important)??

–>Also if i want to master the “Queries” problems, do i have to learn more topics??

–>Any Other suggestion on learning “Queries” Problem.??

1.Segment Trees

2.Binary Index Trees


4.Lazy Propogation

5.Sparse Tables



8.Mo’s Algo

9.Heavy Light Decomposition

10.Square-Root Decomposition

1 Like

I will share my opinion:

MO’s,sqrt decomposition and sparse table are pretty easy.
First learn MO’s algorithm here and sqrt decomposition here and sparse table here

Now learn segment trees and lazy propagation here

No need to learn BIT if you are good at segment tree and lazy propagation.

Now learn LCA here

Learn HLD here

I donno about treaps.

1 Like

Thanku Very much for guidance.