Kth root problem output error

code is not working fine

see the constraints n should be of type long…moreover you are using linear search…you have to use binary search to optimize your code

sir…even then my output is coming to be 1
instead of desired result…please opt out the error i m making

have you applied binary search?
also share your modified code

how and where should i apply binary search

refer to this code:

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.