Intersection of two given arrays

In the given solution where are we taking the input of second array and meaning of freq(temp)!=m.end();line

@dips123deepali_c25f140838182212,
`
for (int i = 0; i < n; i++)
{
cin >> temp; // here input is taken

    if (freq.find(temp) != freq.end() && freq[temp] > 0)
    {
        freq[temp]--; //Decrement frequency to ensure it is not repeated
        ans.push_back(temp);
    }
}

`

and the line freq(temp)!=m.end(); means while freq of temp is not 0

is the doubt clear?

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.