i was trying to solve Distinct Values Queries using a Fenwick tree i read this comment on how to solve it using A fenwick tree but i didn't understand it very well so i was asking for an explanation of the solution
or any other solution using a Fenwick Tree