Map not working


#1

int Solution::removeDuplicates(vector &A) {
// Do not write main() function.
// Do not read input, instead use the arguments to the function.
// Do not print the output, instead return values as specified
// Still have a doubt. Checkout www.interviewbit.com/pages/sample_codes/ for more details

unordered_map<int,bool> mp;
int t=0;
for(int i=0;i<A.size();i++)
{
    mp[A[i]] = true;
    
}
// int k = int(mp.size());

for( auto z = mp.begin();z!=mp.end(); ++z)
{
    t++;
    cout<<t<< " = t"<<endl;
}

return t;

}