Стек. Монотонный стек
Дисклеймер! Для того, чтобы изучить тему, не нужно решать все задачи. Задачи даны с большим запасом, чтобы отработать какую-то тему, если возникнут трудности. Обычно достаточно 1-2 задач на занятии и 2-3 задачи в качестве домашнего задания.
Базовые задачи
- 1614. Maximum Nesting Depth of the Parentheses
- 1021. Remove Outermost Parentheses
- 20. Valid Parentheses
- 155. Min Stack
- 150. Evaluate Reverse Polish Notation
- 1475. Final Prices With a Special Discount in a Shop
- 1047. Remove All Adjacent Duplicates In String
Монотонный стек
Запасные задачи
- 71. Simplify Path
- 225. Implement Stack using Queues
- 227. Basic Calculator II
- 232. Implement Queue using Stacks
- 316. Remove Duplicate Letters
- 385. Mini Parser
- 388. Longest Absolute File Path
- 394. Decode String
- 402. Remove K Digits
- 456. 132 Pattern
- 503. Next Greater Element II
- 581. Shortest Unsorted Continuous Subarray
- 636. Exclusive Time of Functions
- 678. Valid Parenthesis String
- 735. Asteroid Collision
- 739. Daily Temperatures
- 769. Max Chunks To Make Sorted
- 844. Backspace String Compare
- 853. Car Fleet
- 856. Score of Parentheses
- 880. Decoded String at Index
- 901. Online Stock Span
- 907. Sum of Subarray Minimums
- 921. Minimum Add to Make Parentheses Valid
- 946. Validate Stack Sequences
- 962. Maximum Width Ramp
- 1003. Check If Word Is Valid After Substitutions
- 1081. Smallest Subsequence of Distinct Characters
- 1111. Maximum Nesting Depth of Two Valid Parentheses Strings
- 1190. Reverse Substrings Between Each Pair of Parentheses
- 1209. Remove All Adjacent Duplicates in String II
- 1249. Minimum Remove to Make Valid Parentheses
- 1381. Design a Stack With Increment Operation
- 1541. Minimum Insertions to Balance a Parentheses String
- 1544. Make The String Great
- 1574. Shortest Subarray to be Removed to Make Array Sorted
- 1598. Crawler Log Folder
- 1653. Minimum Deletions to Make String Balanced
- 1673. Find the Most Competitive Subsequence
- 1700. Number of Students Unable to Eat Lunch
- 1717. Maximum Score From Removing Substrings
- 1856. Maximum Subarray Min-Product
- 1963. Minimum Number of Swaps to Make the String Balanced
- 2104. Sum of Subarray Ranges
- 2116. Check if a Parentheses String Can Be Valid
- 2211. Count Collisions on a Road
- 2289. Steps to Make Array Non-decreasing
- 2390. Removing Stars From a String
- 2434. Using a Robot to Print the Lexicographically Smallest String