NeetCode #678LC-279Medium1-D Dynamic ProgrammingNC 250
← Back to All Problems

#678 · #279 · Perfect Squares(完全平方数)

📌 Problem Statement & Constraints

Given an integer n, return the fewest number of perfect squares whose sum equals n. A perfect square is k * k for some integer k. Constraints: 1 <= n <= 10^4.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!