Dynamic Programming – Perfect Squares
April 21, 2016
algorithms, c / c++, dynamic programming, leetcode online judge, math, programming languages
No Comments
Find the least number of perfect square numbers (1, 4, 9, 16, 25 …) which sum to the given integer n. For example, given n = 5, return 2 …