Dsa
Recursion
Easy
Find All Subsets
Given a list of integers, write a program to find all possible subsets (the power set). The subsets can be returned in any order. Input a list of integers and output all the subsets, each on a new line.
Example:
Input:
1 2 3
Output:
1
2
3
1 2
1 3
2 3
1 2 3
Key concepts
recursioncombinatoricsarrays
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