Which optimized DP pattern solves this lesson cleanly?
Practice this question from House Robber - Pick or Skip DP Pattern Practice Quiz, with options and an explanation.
Question
Which optimized DP pattern solves this lesson cleanly?
Option A — Correct answer
Pick-or-skip DP with two rolling states.
Option B
Plain recursion without caching
Option C
Two pointers on a sorted array
Option D
Stack matching only
Explanation
Pick-or-skip DP with two rolling states.