my editorial is not being getting unlocked for this question please help me out this
RANDOM QUERY doubt
Hey @Shivam-Singla-618559708603791
There is no editorial for this problem.
Just make a segment tree to store count of unique elements in range of elements. Then for reach query calculate unique numbers in l,r in logn then return unique/(r-l+1)
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.