https://leetcode.com/problems/maximum-width-ramp/description/
Max
Max
j-i
between a[i] <= a[j]
in array #medium #monotonic_stack #sorting👍3
https://leetcode.com/problems/find-score-of-an-array-after-marking-all-elements/description/
Sum of minimums in order excluding siblings #medium #monotonic_stack
Sum of minimums in order excluding siblings #medium #monotonic_stack
👍3
https://leetcode.com/problems/final-prices-with-a-special-discount-in-a-shop/description/
Subtract next smaller value #easy #monotonic_stack
Subtract next smaller value #easy #monotonic_stack
👍2
https://leetcode.com/problems/find-building-where-alice-and-bob-can-meet/description/
Common indices t, h[t] > h[a], h[t] > h[b] for queries q[][a,b] #hard #monotonic_stack
Common indices t, h[t] > h[a], h[t] > h[b] for queries q[][a,b] #hard #monotonic_stack
👍3
Multiply
https://leetcode.com/problems/apply-operations-to-maximize-score/description
k
numbers with max prime factor count #hard #monotonic_stackhttps://leetcode.com/problems/apply-operations-to-maximize-score/description
👍2