Exist or not doubt

n>q so it should be O(N) bcoz initiallly we will traverse the array

@deepakjumani09 hey basically woh hm array ka input lerhe hai aur input ke sath sath map me store krarhe hai so use hm complexity me include nhi krrhe ,main complexity wahi hogi jismw we calculate the work to find whether element exists or not.Hope you get it :slight_smile:

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.