Question DSA-REC-0050
MediumWhat is the time complexity of generating all subsets of n elements by backtracking?
- A.
O(2ⁿ) without copying is impossible
- B.
O(n²)
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Recursion and Backtracking question
What is the time complexity of generating all subsets of n elements by backtracking?
O(2ⁿ) without copying is impossible
O(n²)
Sign up free to see the answer and a step-by-step explanation.
O(n × 2ⁿ)
O(n!)