Can someone provide a good tutorial(well explained) or provide some link on how to exactly implement H-L Decomposition. I have searched a lot and been through almost all suggested websites. The main problem is in the segment tree part. I have seen some implementations but cant understand really why all that is being done.
A walk, through code would be really helpful in understand the essence.
Thank You