Perfect Squares

Medium · Dynamic Programming · about 20 minutes

Asked at Google, Amazon, Meta, Microsoft, Bloomberg.

What is the smallest count of perfect squares (1, 4, 9, 16, …), repeats allowed, that add up to exactly n?

Related guides