Kth Root Problem

my code is not able to clear one of the test case. can u help me in finding out whats missing

Hey @srishti200201_c9588863a697e1e7,
You need to solve the above problem using binary search.
Your code fails for this testcase : 1000000000000 6
as the precision of double isn’t as expected in Java and needs to be set manually, so the answer isn’t accurate.
So rather than solving the problem using double. It’s advisable to use long to avoid any decimal conversions.

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.

https://ide.codingblocks.com/s/606833 cant understand why this code is not passing any test case

You need to initiate the low with 0 and not k.
Here’s your updated code: https://ide.codingblocks.com/s/607067