BUG LAB · Stack
Warm is not warmer
Which temperatures expose the nonstrict comparison?
Java · intentionally broken snippet
while (!stack.isEmpty()
&& t[i] >= t[stack.peek()]) {
int day = stack.pop();
answer[day] = i - day;
}Assume ordinary supporting code and valid inputs unless the question states otherwise.
Choose an answer before revealing the trace. Keys 1 to 3 work too.