Practice
Learn
← Quit
0 / 0 correct
Data Structures
Medium
1 of 20
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
Shortest paths
D
Sorting in O(n)