Perfect Squares

Given an integer n, return the least number of perfect square numbers that sum to n.

A perfect square is an integer that is the square of an integer; in other words, it is the product of some integer with itself (e.g., 1, 4, 9, 16, ...).

Examples
Input: 12
Output: 3
Hints

Perfect Squares

Given an integer `n`, return the least number of perfect square numbers that sum to `n`.