vector countDistinct (int A[], int n, int k)
{
vector res;
unordered_set uset;
for(int i=0;i<=n-k;i++){
for(int j=i;j<i+k;j++){
uset.insert(A[j]);
}
res.push_back(uset.size());
uset.erase(uset.begin(),uset.end());
}
return res;
}
what will be the TC n SC of this code??