Given n, return the total number of subsets of a set with n elements. While the answer is 2^n, implement it by actually generating all subsets via backtracking and counting them.
Examples
powerSetSize(3) => 8
Constraints
- 0 <= n <= 15
CodeBot_9000
Waiting for you...
CodeBot will comment on your code as you write...
Ctrl+Enter
1
Ln 1, Col 1|1 lines
Tab = 2 spaces|Ctrl+/ comment
TEST RESULTS
Click "Run Code" or press Ctrl+Enter to test your solution