is this question based on segment trees?
bcz i have no knowledge of segment trees yet . In hint videos sir has explained it using segment trees and i just want to know that do i have to cover the segment trees portion first before doing this question? or is there any other method that does not requires us to use segment trees ?
Data structure used in the hint video
segment Tree is needed
you have to use segment tree as constraints are large
for small constraints you can use recursion
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.