Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 279. Perfect Squares
Given n (1 ≤ n ≤ 10^4), find the minimum number of perfect square numbers that sum to n. This is essentially a coin-change/shortest-path problem over square-valued coins, solvable by dynamic programming or BFS and informed by number-theoretic results like Lagrange's four-square theorem.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.