Why is the brute-force approach less ideal here?
Practice this question from Climbing Stairs - Fibonacci DP Pattern Practice Quiz, with options and an explanation.
Question
Why is the brute-force approach less ideal here?
Option A — Correct answer
It recomputes the same stair counts through recursion.
Option B
It is always constant time
Option C
It avoids all repeated states
Option D
It works only on trees
Explanation
It recomputes the same stair counts through recursion.