can anyone suggest how to solve the problem subarray distinct values from cses problemset?
here is link to the problem https://cses.fi/problemset/task/2428