I was so close to giving up. Great Kata. Very satisfying. Thank you for your work; however, I really wondered how every number can be written as sum of perfect squares with maximum 4 number. Can someone explain that ?

In test case with number 19 the right answer should be 4, not 3. Because 19 = 16 + 1 + 1 + 1.
And in case with number 18 the right answer should be 3, because 18 = 16 + 1 + 1. Shouldn't it?

And what 3 perfect squares add up to 15? Have you read the kata description?

@Chrono79, in that case, test for n = 15 should not be 4, but 3

This comment is hidden because it contains spoiler information about the solution

C# translation added~

I was so close to giving up. Great Kata. Very satisfying. Thank you for your work; however, I really wondered how every number can be written as sum of perfect squares with maximum 4 number. Can someone explain that ?

18=9+9

19=9+9+1

In test case with number 19 the right answer should be 4, not 3. Because 19 = 16 + 1 + 1 + 1.

And in case with number 18 the right answer should be 3, because 18 = 16 + 1 + 1. Shouldn't it?

This comment is hidden because it contains spoiler information about the solution

This comment is hidden because it contains spoiler information about the solution

.

java translationplease review and approve.

cheers

This comment is hidden because it contains spoiler information about the solution

This comment is hidden because it contains spoiler information about the solution

any hint?

it's not about DP, here. You need even more efficient.

## Loading more items...