โ† Amazon questions

Number of ways to obtain number as sum of natural numbers

Filed under Amazon

Given a positive integer n, compute the number of unique ways to express n as the sum of natural numbers (integer partitions). The order of addends does not matter.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.