INTERVAL TREES!! NEED HELP

Hi all. I recently learnt about interval trees, how I can search for overlapping intervals. But under suggested problem I found FLIPCOIN. Can anyone explain me how it can be solved using INTERVAL TREE. It will help me understand the working of the ds better. Thanks.
P.S: I don’t want the segment tree solution. I have already solved it using segment trees. I am only interested in knowing the solution using Interval Trees. And also anything that would help me understanding it better is appreciated.

1 Like