Given an array of n integers. Count the total number of sub-array having total distinct elements same as that of total distinct elements of the original array.
The first line of input contains an integer T denoting the number of test cases. Each test case contains
the number of elements in the array a as n and next line contains space separated n elements in
For each test case output an integer which is the required answer.
2 1 3 2 3
2 4 5 2 1
2 4 4 2 4
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.