please check my codeand help me in finding out my mistake.
_https://ide.codingblocks.com/s/270237
My code showing TLE
Don’t use pow function as pow(mid,k) can be a very big number which will cause overflow .
Refer this discussion for the approach Kth root not running
sir you pleae expain the logic of your code
It is a simple binary search. Dry run with any sample case and you will understand.
We are searching for the best/closest number in the search space whose kth power is the given number.
Check this implementation https://ide.codingblocks.com/s/22939
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.