Regarding the monotonic

what is p in these how much times it will run

Hey @ssmit_joshi can you please elaborate your doubt and the time lapse where you didn’t understand the logic?

i am telling that why u have taken p here i am not understanding the whole floating part what is p used for here pls explain

Hey @ssmit_joshi this problem is to find square root of a number n, with precision upto p decimal points. The integer part will be easily find out from using binary search as explained in the video but the decimal part is to be calculated by doing iteration of 0.1, 0.01 … 0.0…0(p-1)1 until we hit the most close number which will be square root of the given integer. Still if you want an editorial here it is https://www.geeksforgeeks.org/find-square-root-number-upto-given-precision-using-binary-search/ :smile:

and here inc/=10 why it is used

Just as i told you that we will do till p decimal places , so we will divide it by 10 p time so that we can take more precise value.

Inc/=10 means
Inc = inc/10

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.