EdocGram
Home
(current)
Topics
EdocAI
Code Editor
HTML
Javascript
PHP
Python
Python AI Code Editor
More
Contact
About
Privacy Policy
Terms and Conditions
Log In
Topic
View
More
Topic
Hashing
Linked List
Queue
Stack
Backtracking
Dynamic Programming
Graph Theory
Bit Manipulation
Mathematics
Sliding Window Technique
Divide And Conquer
Matrix Manipulation
Two Pointers
Tree
Topic: stack-problem / Level: beginner
1. Implement a stack using an array.
2. Write a program to implement a stack using a linked list.
3. Create a function to push an element onto a stack.
4. Create a function to pop an element from a stack.
5. Write a program to check if a stack is empty.
6. Write a program to check if a stack is full (for a fixed-size stack).
7. Implement a function to peek at the top element of a stack.
8. Write a program to find the size of a stack.
9. Create a function to reverse a string using a stack.
10. Write a function to check if parentheses in a string are balanced using a stack.
11. Create a program to convert an infix expression to a postfix expression using a stack.
12. Write a program to evaluate a postfix expression using a stack.
13. Implement a function to find the minimum element in a stack.
14. Create a stack that supports push, pop, and retrieving the minimum element in constant time.
15. Write a program to sort elements in a stack.
16. Implement a function to check if a stack is a palindrome.
17. Write a function to merge two stacks into one.
18. Implement a function to duplicate a stack.
19. Write a program to reverse the order of elements in a stack using recursion.
20. Create a function to find the middle element of a stack.
21. Write a program to delete the middle element of a stack.
22. Implement a function to sort a stack using only one additional stack.
23. Write a program to implement two stacks using a single array.
24. Implement a function to check for stack overflow in an array-based stack.
25. Create a program to find the next greater element for every element in an array using a stack.
26. Write a program to find the next smaller element for every element in an array using a stack.
27. Create a function to insert an element at the bottom of a stack.
28. Write a program to find the span of stock prices using a stack.
29. Implement a function to convert a decimal number to binary using a stack.
30. Write a program to convert a decimal number to hexadecimal using a stack.
31. Implement a stack-based program to solve the Tower of Hanoi problem.
32. Write a program to check if a stack has duplicate elements.
33. Implement a function to reverse every pair of elements in a stack.
34. Write a program to merge two sorted stacks into one sorted stack.
35. Create a function to find the kth largest element in a stack.
36. Write a program to print all elements of a stack without using recursion.
37. Implement a function to calculate the sum of all elements in a stack.
38. Write a program to delete all elements of a stack.
39. Create a function to check if the stack contains only even numbers.
40. Write a program to push all odd numbers from a list into a stack.
41. Implement a function to reverse the digits of a number using a stack.
42. Write a program to implement a stack of characters and check if a word is a palindrome.
43. Create a function to reverse the order of words in a sentence using a stack.
44. Write a program to find the depth of a nested parenthesis expression using a stack.
45. Implement a function to convert a prefix expression to an infix expression using a stack.
46. Write a program to implement a stack of books with push and pop operations.
47. Create a function to copy one stack into another stack.
48. Write a program to push elements into a stack until a specified value is encountered.
49. Implement a stack that supports push, pop, and finding the maximum element in constant time.
50. Write a function to rotate a stack k times to the right.
Previous
1
2
...
20
Next
More Levels
Intermediate
Advanced
Aniket The Programmer
This website is managed by aniket the programmer :)
Website
Instagram