feat(content): more test cases

This commit is contained in:
2025-07-13 19:25:39 +01:00
parent e28da5def2
commit 0f264ef603
94 changed files with 1840 additions and 0 deletions

View File

@@ -10,6 +10,32 @@ patterns:
- dynamic-programming
- bfs
function_signature: "def num_squares(n: int) -> int:"
test_cases:
visible:
- input: { n: 12 }
expected: 3
- input: { n: 13 }
expected: 2
- input: { n: 1 }
expected: 1
hidden:
- input: { n: 4 }
expected: 1
- input: { n: 2 }
expected: 2
- input: { n: 3 }
expected: 3
- input: { n: 7 }
expected: 4
- input: { n: 100 }
expected: 1
- input: { n: 99 }
expected: 3
- input: { n: 48 }
expected: 3
description: |
Given an integer `n`, return *the least number of perfect square numbers that sum to* `n`.