Stack Patterns

Problems using stack data structure

31 lessons
80 min

Lessons

1. What is Stack Patterns

Pattern overview

2m

2. Prerequisites

What you need first

1m

3. When to Use

Pattern triggers

2m

4. When NOT to Use

Avoid forcing this pattern

2m

5. LeetCode 20 Valid Parentheses - Problem Statement

The problem

2m1 problems

6. LeetCode 20 Valid Parentheses - Solution

The core idea

3m

7. LeetCode 20 Valid Parentheses - Example and Complexity Analysis

Walkthrough and analysis

3m

8. LeetCode 20 Valid Parentheses - Implementation

The approach

4m1 problems

9. LeetCode 155 Min Stack - Problem Statement

The problem

2m1 problems

10. Quiz: Tracking Minimum in O(1)

Test your understanding

2m1 problems

11. LeetCode 155 Min Stack - Why Naive Fails

The trap

2m

12. LeetCode 155 Min Stack - Solution

The core idea

3m

13. LeetCode 155 Min Stack - Example and Complexity Analysis

Walkthrough and analysis

3m

14. LeetCode 155 Min Stack - Implementation

The approach

4m1 problems

15. LeetCode 150 Evaluate Reverse Polish Notation - Problem Statement

The problem

2m1 problems

16. LeetCode 150 Evaluate Reverse Polish Notation - Solution

The core idea

3m

17. LeetCode 150 Evaluate Reverse Polish Notation - Example and Complexity Analysis

Walkthrough and analysis

3m

18. LeetCode 150 Evaluate Reverse Polish Notation - Implementation

The approach

4m1 problems

19. LeetCode 394 Decode String - Problem Statement

The problem

2m1 problems

20. Quiz: Handling Nested Brackets

Test your understanding

2m1 problems

21. LeetCode 394 Decode String - Why Naive Fails

The trap

2m

22. LeetCode 394 Decode String - Solution

The core idea

3m

23. LeetCode 394 Decode String - Example and Complexity Analysis

Walkthrough and analysis

3m

24. LeetCode 394 Decode String - Implementation

The approach

4m1 problems

25. LeetCode 227 Basic Calculator II - Problem Statement

The problem

2m1 problems

26. LeetCode 227 Basic Calculator II - Why Naive Fails

The trap

2m

27. LeetCode 227 Basic Calculator II - Solution

The core idea

3m

28. LeetCode 227 Basic Calculator II - Example and Complexity Analysis

Walkthrough and analysis

3m

29. LeetCode 227 Basic Calculator II - Implementation

The approach

4m1 problems

30. Common Mistakes

Common errors to avoid

2m

31. Section Recap

Summary

1m

Practice Problems

Ready to start learning?

Access all 31 lessons with interactive content and progress tracking.