Using A Map For Dynamic Programming In C++
Join the DZone community and get the full member experience.
Join For Free// A solution to the "Three N + 1" Problem for the UVa Online Judge
// The difference between the DP solution and the brute-force solution is dramatic --
// a run-time of 1.030 seconds drops to 0.370
#include
#include
Dynamic programming
Opinions expressed by DZone contributors are their own.
Comments