1 case wrong ans can u suggest me with code for base cases like p=0 and p=1
Birthday paradox
You need to use direct formula to pass that test case.
ceil(sqrt(1.02365*log(1/(1-p))))
You can have a look at its implementation here.
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.