AniketTheProgrammer
Home
(current)
Courses
Projects
YT Projects
Coding Questions
Notification
Contact Us
Log In
All Topics
C Language
C++ Language
Greedy Algorithm
Hashing
Java Language
Linked List
Python
Queue
Stack
String
Sorting
Searching
Recursion
Backtracking
Dynamic Programming
Graph Theory
Bit Manipulation
Mathematics
Sliding Window Technique
Divide And Conquer
Matrix Manipulation
Two Pointers
Binary Tree
Topic: Stack-question / Level: Beginner
1. Implement a stack using an array.
2. Implement a stack using a linked list.
3. Write a function to push an element onto the stack.
4. Write a function to pop an element from the stack.
5. Write a function to peek at the top element of the stack without removing it.
6. Write a function to check if the stack is empty.
7. Write a function to get the size of the stack.
8. Write a function to clear the stack.
9. Implement a function to reverse a string using a stack.
10. Implement a function to check for balanced parentheses using a stack.
11. Write a function to convert infix expressions to postfix expressions using a stack.
12. Write a function to evaluate postfix expressions using a stack.
13. Implement a function to check if a given string is a palindrome using a stack.
14. Write a function to sort a stack using another stack.
15. Write a function to find the minimum element in a stack in O(1) time.
16. Implement a stack that supports push, pop, top, and retrieving the minimum element in constant time.
17. Write a function to implement a stack with a fixed size.
18. Write a function to implement a dynamic stack that grows as needed.
19. Implement a function to copy elements from one stack to another.
20. Write a function to rotate elements in a stack.
21. Implement a function to merge two stacks into one.
22. Write a function to check for matching brackets in an expression using a stack.
23. Implement a function to perform a depth-first search (DFS) using a stack.
24. Write a function to generate all permutations of a string using a stack.
25. Write a function to print the elements of a stack in reverse order.
26. Implement a function to remove duplicates from a stack.
27. Write a function to find the second largest element in a stack.
28. Implement a function to check if two stacks are equal.
29. Write a function to find the largest element in a stack.
30. Implement a function to move all elements from one stack to another.
Previous
1
2
3
4
5
6
7
Next
More Levels
Intermediate
Advanced
Most Visited
Implement a function to find the minimum height of a binary tree using a stack.
Write a function to find the largest element in a stack.
Write a function to find the longest sequence of consecutive numbers in a stack.
Implement a function to find the longest balanced substring of parentheses using a stack.
Implement a function to sort a stack using recursion.
Write a function to reverse a stack using recursion.
Implement a function to check if a stack can be sorted with a single auxiliary stack.
Implement a function to insert an element at the bottom of the stack.
Implement a function to calculate the Fibonacci series using a stack.
Implement a function to interleave two stacks.
Write a function to remove the last element from a stack.
Write a function to find pairs of elements that sum to a specific value in a stack.
Write a function to evaluate a mathematical expression in postfix notation with error handling.
Implement a function to find the middle element of a stack in O(1) time.
Implement a stack using an array.