Hi @StefanPochmann I have a question about the correctness of the DP subproblem but I couldn't find an answer anywhere. Could you help explain this:

The core idea of this solution is num_square[i] = num_square[b] + 1, where b is among all the values such that i-b is perfect square (e.g., num_square[i-b] == 1, that have a minimum num_square[b].

Now my question is this - why couldn't there be a b', such that i - b' is NOT a perfect square (e.g., num_square[i-b'] > 1), but num_square[b'] + num_square[i - b'] < num_square[b] + 1? Why everybody just assumes this is not possible?