Practice
Learn
← Quit
0 / 0 correct
Data Structures
Medium
1 of 40
What does a monotonic stack help compute efficiently?
A
Median of a stream
B
The next greater (or smaller) element for every position in O(n)
C
Sorting in O(n)
D
Shortest paths