- JDK (v17+);
- Maven (v3.9.5);
The build process needs maven. In order to do that, use the command below:
mvn clean install
In order to run the demo project, just run the command below after Build:
java -jar target/coins-1.0-SNAPSHOT.jar
The complexity of this algorithm is so large, because we have 4 for statements. The complexity of this algorithm is O(n^4) and it is not possible to be executed for large numbers.
I know that it could be improved using Dynamic Programming or Recursive Backtracking method to solve that. But based on time to solve the algorithm and questions, I give my best to solve it!