-
Notifications
You must be signed in to change notification settings - Fork 20.8k
Description
Is your feature request related to a problem? Please describe.
I would like to add a solution to a problem under the backtracking category , the input includes a number N and a power X and output will be a single integer , the number of possible ways the number N can be represented as a sum of different natural numbers raised to the power X.
For Example : if N = 100 and X = 3 output will be 1 as there is only 1 possible way to represent 100 as cube of natural number and that is 1^3+ 2^3 + 3^3 + 4^3 .
Describe the solution you'd like.
I will use backtracking and start finding the sum from 1 raised to X, if it will be less than the number I will add the next number rasied to X otherwise I will backtrack and add the next number raised to X , till a single number raised to X becomes greater than N.
I would like to work on this implementation as part of Hacktoberfest 2021.
@siriak Could you please assign this issue to me?
Thanks.