Stack

Core stack operations, expression evaluation, monotonic stacks, and classic interview patterns.

Filter by difficulty:
Implementation
•
Implement a stack using linked list Easy
•
Implement a stack using a queue Easy
•
Implement Min / Max stack with O(1) Easy
•
Implement K stacks in a single array Hard
•
Maximum rectangular area in histogram Hard
Expressions
•
Infix to Prefix Medium
Solution not available
•
Infix to Postfix Medium
Solution not available
•
Prefix to Postfix Medium
Solution not available
•
Prefix to Infix Medium
Solution not available
•
Postfix to Prefix Medium
Solution not available
•
Postfix to Infix Medium
Solution not available
•
Check valid parenthesis with * wildcard Medium
•
Longest valid parenthesis length Hard
•
Evaluate Reverse Polish Notation (RPN) Medium
•
Evaluate calculator (+, -, (, )) Hard
•
Evaluate calculator (+, -, *, /) Medium
•
Evaluate calculator (+, -, *, /, (, )) Hard
Monotonic Stack & Applications
•
Max width pair (i < j and nums[i] ≤ nums[j]) Medium
•
Next greater / smaller element in an array Easy
•
Next Greater Element I Easy
•
Next Greater Element II (circular array) Medium
•
Max of min for every window size Hard
•
Stock Span Problem Medium