Some newbie messaged me with asking for help on this article https://www.geeksforgeeks.org/queries-for-number-of-distinct-elements-in-a-subarray-set-2/.
Can someone explain why time complexity is O(log n) and not O(n)?
Please read it once before downvoting. It is an advanced data structure, that is not well known.