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

1 Like

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