What does the optimized pair approach store with each value?
Practice this question from Min Stack - Auxiliary stack Pattern Practice Quiz, with options and an explanation.
Question
What does the optimized pair approach store with each value?
Option A — Correct answer
The current minimum with each pushed value
Option B
Only the first value
Option C
A sorted copy of all values
Option D
A queue size only
Explanation
It stores the current minimum at the time that value is pushed.