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
151. Write a function to implement a stack that returns elements in a sorted manner.
152. Implement a function to find all distinct elements in a stack.
153. Write a function to merge two stacks while maintaining their order.
154. Implement a function to create a stack of tuples and perform operations.
155. Write a function to check if the sum of elements in a stack is even or odd.
156. Implement a function to find the greatest common divisor (GCD) of elements in a stack.
157. Write a function to find the least common multiple (LCM) of elements in a stack.
158. Implement a function to create a stack of dictionaries and perform operations.
159. Write a function to perform operations on a stack based on user input.
160. Implement a function to clear a stack and check if it still contains elements.
161. Write a function to find if a stack can be rearranged into a specific order.
162. Implement a function to swap two elements at specific indices in a stack.
163. Write a function to simulate a stack-based calculator.
164. Implement a function to check if a stack is empty before popping.
165. Write a function to simulate a stack-based game.
166. Implement a function to count how many times a specific element appears in a stack.
167. Write a function to get the first and last elements of a stack without popping.
168. Implement a function to find pairs of elements in a stack that multiply to a specific value.
169. Write a function to implement a stack of custom objects and perform operations.
170. Implement a function to reverse the order of elements in a stack using recursion.
171. Write a function to find the unique elements in a stack and return them as a list.
172. Implement a function to create a stack from user input.
173. Write a function to merge two stacks while removing duplicates.
174. Implement a function to check if a stack is sorted in descending order.
175. Write a function to get the top N smallest elements from a stack.
176. Implement a function to implement a stack that counts the number of operations.
177. Write a function to display the first three elements of the stack.
178. Implement a function to find the sum of the top N elements in a stack.
179. Write a function to check if the stack contains a specific element before popping.
180. Implement a function to simulate a real-world scenario using a stack.
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.