Getting Timelimit exceeded don’t know why …
plz check the folowing code…
Exist or Not problem hasing getting time error
hi prajjwal
your code is producing tle for cases when N is around 10,000.
you need to optimize your code for such cases
@caesar_20 hey prajjwal since the test cases 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.
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.