All challenges

Stacks

Last in, first out: matching brackets, undo and the next greater element.

StatusChallengeLevelSave
1.Valid ParenthesesCheck that every bracket is closed by the right kind, in the right order.Easy
2.Days Until WarmerFor each day, count the days until a warmer one.Medium
3.Evaluate Reverse Polish NotationWork out an arithmetic expression written in postfix order.Medium
4.Trapping Rain WaterWork out how much rain water a skyline of bars holds.Hard
5.Longest Valid ParenthesesFind the longest balanced run in a string of parentheses.Hard
6.Largest Rectangle in a HistogramFind the biggest rectangle that fits under a bar chart.Hard