Here is the problem QUESTION. My approach :- I am taking the Nth root of the given no X and then storing the Nth power of that numbers in an array.
for ex :- x = 100, n = 3 then nth root is 4 and now storing Nth power 1,8,27,64 into an array. Now the main part comes where i am choked. I am unable to write down the code for counting that how many pair of numbers when added give me the number X. specially without using recursion and also didn't get the solution given in the above question link.
Can anyone please help me out through this by explaining that what is the actual concept I have to apply to solve this kind of problems. If possible please explain without using recursion and by using my approach if it is an efficient way to solve this problem. Thank you.