What should the dry run track?
Practice this question from House Robber - Pick or Skip DP Pattern Practice Quiz, with options and an explanation.
Question
What should the dry run track?
Option A — Correct answer
Track prev2, prev1, current, and each house value.
Option B
Only the final answer, not the state transition
Option C
The alphabetical order of variable names
Option D
Only whether input contains duplicates
Explanation
Track prev2, prev1, current, and each house value.