Can you discuss your approach for CHEFEXQ

I made a video tutorial for this problem at my youtube channel. Watch it here https://www.youtube.com/watch?v=FqunpSmkzgE

I have used SquareRoot Decomposition to solve this.

2 Likes

@rachitiitr can you tell me if I can solve this problem with the help of segment tree or not ?