Why is the brute-force approach less ideal here?

Practice this question from Subsets - Pick or Skip Recursion Pattern Practice Quiz, with options and an explanation.

Question

Why is the brute-force approach less ideal here?

Option A — Correct answer

Bitmasking works but hides the recursive choice template.

Option B

It always avoids invalid states

Option C

It uses no recursion

Option D

It only works for sorted arrays

Explanation

Bitmasking works but hides the recursive choice template.

Subsets - Pick or Skip Recursion Pattern Practice Quiz

All questions · Previous question · Next question

Open on QuizMaker