Kth root TLE error

I’ve tried to solve this question using Binary search in arrays. Please check where I’m wrong.

Hi @harshvapilani,
why are you taking arr … and what are you doing with it the mechanism is simple you have to first take a input test case t and then take two inputs for each test case … one is n and the other is k … Now take the low as 1 and high as 1000000 and then take a mid … Now use binary search till (low<high) and if mid^k >n then high = mid -1 and if not then low=mid…

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.