Introduction to Stack

Medium
16 views 22 Dec 2025
Explain what a stack data structure is and how it follows the LIFO principle....

Stack Operations

Medium
16 views 22 Dec 2025
Explain basic stack operations such as push, pop, peek, and isEmpty....

Stack Implementation Using Array

Medium
11 views 22 Dec 2025
Implement a stack using an array and explain how overflow and underflow occur....

Stack Implementation Using Linked List

Medium
16 views 22 Dec 2025
Implement a stack using linked list and explain dynamic memory usage....

Check Balanced Parentheses

Medium
11 views 22 Dec 2025
Check whether an expression has balanced parentheses using stack....

Reverse a String Using Stack

Medium
14 views 22 Dec 2025
Reverse a string using stack and explain the process step by step....

Infix to Postfix Conversion

Medium
12 views 22 Dec 2025
Convert an infix expression to postfix using stack....

Evaluate Postfix Expression

Medium
13 views 22 Dec 2025
Evaluate a postfix expression using stack....

Next Greater Element

Medium
10 views 22 Dec 2025
Find the next greater element for each element in an array using stack....

Previous Smaller Element

Medium
13 views 22 Dec 2025
Find the previous smaller element for each element using stack....

Stock Span Problem

Medium
13 views 22 Dec 2025
Solve the stock span problem using stack and explain the logic....

Largest Rectangle in Histogram

Medium
14 views 22 Dec 2025
Find the largest rectangular area in a histogram using stack....

Implement Queue Using Stack

Medium
14 views 22 Dec 2025
Implement a queue using stack and explain the approach....

Implement Stack Using Queue

Medium
14 views 22 Dec 2025
Implement a stack using queue and explain the approach....

Check Palindrome Using Stack

Medium
13 views 22 Dec 2025
Check whether a string is palindrome using stack....

Sort a Stack

Medium
13 views 22 Dec 2025
Sort a stack using recursion or another stack....

Minimum Element in Stack

Medium
15 views 22 Dec 2025
Design a stack that supports getMin operation in O(1) time....

Remove Adjacent Duplicates

Medium
10 views 22 Dec 2025
Remove adjacent duplicate characters from a string using stack....

Decode String

Medium
14 views 22 Dec 2025
Decode an encoded string using stack....

Celebrity Problem

Medium
15 views 22 Dec 2025
Find the celebrity in a party using stack approach....