What should the dry run track?
Practice this question from Median Finder - Two Heaps Pattern Practice Quiz, with options and an explanation.
Question
What should the dry run track?
Option A — Correct answer
Track both heap tops and heap sizes after each insertion.
Option B
Only the final answer, not heap state
Option C
The alphabetical order of variables
Option D
Only whether values are negative
Explanation
Track both heap tops and heap sizes after each insertion.