How should equal temperatures be treated?
Practice this question from Daily Temperatures - Monotonic stack Pattern Practice Quiz, with options and an explanation.
Question
How should equal temperatures be treated?
Option A — Correct answer
Equal is not warmer
Option B
Equal always resolves a day
Option C
Equal should return -1
Option D
Equal means sort the array
Explanation
Equal is not warmer, so only strictly greater temperatures resolve a day.