why is this code showing timelimit error despite using unordered map https://ide.codingblocks.com/s/97850
EXIST OR NOT-doubt 1
@aganunay hey anunay gupta since the testcases can be very large, it is preferable that you insert the input values in the hashmap by using insert function and then check by using count function instead of doing m[a[i]] as false, otherwise for very large inputs, you will get TLE.
and now try if you unable to implement do ask I will give you reference.
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.