We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1447db4 commit 3ecdbd0Copy full SHA for 3ecdbd0
src/main/java/com/thealgorithms/backtracking/PowerSum.java
@@ -1,3 +1,16 @@
1
+package com.thealgorithms.backtracking;
2
+
3
4
+/**
5
+ * Problem Statement:
6
+ * Find the number of ways that a given integer, N, can be expressed as the sum of the Xth powers
7
+ * of unique, natural numbers.
8
+ * For example, if N=100 and X=3, we have to find all combinations of unique cubes adding up to 100.
9
+ * The only solution is 1^3 + 2^3 + 3^3 + 4^3. Therefore, the output will be 1.
10
+ *
11
+ * N is represented by the parameter 'targetSum' in the code.
12
+ * X is represented by the parameter 'power' in the code.
13
+ */
14
public class PowerSum {
15
16
/**
0 commit comments