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
101. Write a function to push elements from an array into a stack and pop elements until the stack is empty.
102. Create a stack-based program to find the largest rectangle in a histogram.
103. Write a program to push elements from a stack into an array and print the reversed array.
104. Implement a function to push numbers into a stack and find the greatest common divisor (GCD) of all elements.
105. Write a function to delete all elements less than a given value from a stack.
106. Create a program to push all odd numbers from an array into a stack and count them.
107. Write a program to convert a binary number to decimal using a stack.
108. Implement a function to push the characters of a string into a stack and check if the string is a palindrome.
109. Write a program to push elements into a stack and print them in ascending order.
110. Create a function to pop all elements from a stack and return the sum of even elements.
111. Write a program to reverse every second element in a stack.
112. Implement a function to push elements into a stack and pop elements if they are divisible by a given value.
113. Write a program to push elements into a stack and pop elements in pairs.
114. Create a function to push the elements of an array into two stacks, separating even and odd numbers.
115. Write a function to push elements into a stack and find the mode (most frequent element).
116. Implement a function to remove all even elements from a stack.
117. Write a program to convert a postfix expression to a prefix expression using a stack.
118. Create a function to push the Fibonacci series into a stack up to n terms.
119. Write a program to remove all elements divisible by 5 from a stack.
120. Implement a function to find the product of all elements in a stack.
121. Write a program to push elements into a stack and remove the elements with prime indices.
122. Create a function to find the nth element from the top of a stack.
123. Write a program to push all multiples of 3 from an array into a stack.
124. Implement a function to push elements into a stack and check if all elements are unique.
125. Write a program to reverse every third element in a stack.
126. Create a function to push elements into a stack and remove elements greater than the median.
127. Write a program to push characters of a string into a stack and remove all vowels.
128. Implement a function to push the squares of numbers from an array into a stack.
129. Write a program to push elements into a stack and keep only the prime numbers.
130. Create a function to push all elements from an array into a stack and count the number of even elements.
131. Write a program to push elements into a stack and check if the elements are sorted in descending order.
132. Implement a function to push elements into a stack and pop elements until an odd number is encountered.
133. Write a program to push elements into a stack and pop elements based on their index (prime indices first).
134. Create a function to reverse an infix expression using a stack.
135. Write a program to push elements into a stack and pop elements in reverse order.
136. Implement a function to push elements into a stack and remove elements less than a given threshold.
137. Write a program to push elements into a stack and reverse every pair of elements.
138. Create a function to push elements from a matrix into a stack column by column.
139. Write a program to push elements into a stack and count how many elements are greater than a specified number.
140. Implement a function to check if a stack contains a specific element.
141. Write a program to push elements from one stack into another in reverse order.
142. Create a function to push elements into a stack and find the maximum element using only one loop.
143. Write a program to push elements into a stack and remove the last k elements.
144. Implement a function to find the difference between the maximum and minimum elements in a stack.
145. Write a program to push the factorial of numbers from 1 to n into a stack.
146. Create a function to pop all elements from a stack and print them in pairs.
147. Write a program to push elements into a stack and print all the prime elements.
148. Implement a function to push elements into a stack and pop the middle element.
149. Write a program to push the elements of a string into a stack and remove all consonants.
150. Create a function to push elements into a stack and find the average of the elements.
Previous
2
3
4
...
20
Next
More Levels
Intermediate
Advanced
Aniket The Programmer
This website is managed by aniket the programmer :)
Website
Instagram