https://online.codingblocks.com/player/6183/content/940?s=783
Can u tell me the idea
You just need to find number of distinct subarrays, where the array would be considered distinct only if it has different elements than others. You can make use o Hashmap to solve this question. Use it as a hint and then try it.