Question bank › Recursion
Dsa Recursion Hard

Sum of Subset Sums

Given a list of integers, write a program that calculates the sum of all possible subset sums. The input consists of an integer n (1 ≤ n ≤ 20) followed by n integers (1 ≤ num ≤ 100). The output should be a single integer representing the total sum of all subset sums. Example: Input: 3 1 2 3 Output: 24

Key concepts

recursiondynamic programmingcombinatorics

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
Part of Praxari's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.