Practice
Learn
← Quit
0 / 0 correct
Algorithms
Hard
1 of 10
What does the 'largest rectangle in histogram' problem use to reach O(n)?
A
Dynamic programming over all pairs
B
A monotonic increasing stack of bar indices, computing areas when bars are popped
C
Sorting bar heights
D
Divide and conquer only