Dsa
Dynamic Programming
Easy
Divisor Count Path
You are given an integer n. Find the number of unique ways to express n as the sum of two or more integers, where no integer is larger than the last one in the sum (for example, 5 = 2 + 2 + 1 + 1).
Input:
- A single integer n (1 <= n <= 100).
Output:
- A single integer representing the number of unique sums.
Example:
Input:
4
Output:
5
Key concepts
dynamic_programmingarraycounting
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now