filmov
tv
Min Stack Leetcode | Get Min at pop | solution stack Hindi Explained | Data structure & Algorithms

Показать описание
This is the video under the series of DATA STRUCTURE & ALGORITHM in a STACK Playlist. Now we are going to solve a stack problem Min Stack or Get min at pop from GeeksForGeeks.
----------------------------------------------------------------------------------------
► 155. Min Stack
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.
Implement the MinStack class:
MinStack() initializes the stack object.
void push(int val) pushes the element val onto the stack.
void pop() removes the element on the top of the stack.
int top() gets the top element of the stack.
int getMin() retrieves the minimum element in the stack.
Input
["MinStack","push","push","push","getMin","pop","top","getMin"]
[[],[-2],[0],[-3],[],[],[],[]]
Output
[null,null,null,null,-3,null,0,-2]
Explanation
MinStack minStack = new MinStack();
----------------------------------------------------------------------------------------
*Follow me *
----------------------------------------------------------------------------------------
►Our Playlists on:-
------------------------------------------------------------------------
🌟 Please leave a LIKE ❤️ and SUBSCRIBE for more AMAZING content! 🌟
✨ Tags ✨
leetcode problems
leetcode problems java
leetcode problems python
leetcode problems that got me tired
leetcode problems c++
leetcode problems and solutions python
leetcode problems playlist
leetcode problems and solutions java
leetcode problems in Hindi
leetcode problems javascript
leetcode problems and solutions
leetcode problems of the day
leetcode problems for beginners
leetcode problems easy
leetcode problems js
Introduction to the graph data structure
stack practice problems
stack practice problems gfg
leetcode stack questions
leetcode stack queue
stack hello world
MIn stack leetcode solution
Get Min at pop gfg
remove consecutive duplicates from a string
question asked in Google
off-campus placement
number of closed islands
Practice stack data structure
Stack in a data structure in Hindi
Stack Full playlist for Beginners
algorithms
graph
data structure
sorting algorithms
algorithm analysis
gate computer science preparation
programming languages
#stack #Leetcode #DSA
----------------------------------------------------------------------------------------
► 155. Min Stack
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.
Implement the MinStack class:
MinStack() initializes the stack object.
void push(int val) pushes the element val onto the stack.
void pop() removes the element on the top of the stack.
int top() gets the top element of the stack.
int getMin() retrieves the minimum element in the stack.
Input
["MinStack","push","push","push","getMin","pop","top","getMin"]
[[],[-2],[0],[-3],[],[],[],[]]
Output
[null,null,null,null,-3,null,0,-2]
Explanation
MinStack minStack = new MinStack();
----------------------------------------------------------------------------------------
*Follow me *
----------------------------------------------------------------------------------------
►Our Playlists on:-
------------------------------------------------------------------------
🌟 Please leave a LIKE ❤️ and SUBSCRIBE for more AMAZING content! 🌟
✨ Tags ✨
leetcode problems
leetcode problems java
leetcode problems python
leetcode problems that got me tired
leetcode problems c++
leetcode problems and solutions python
leetcode problems playlist
leetcode problems and solutions java
leetcode problems in Hindi
leetcode problems javascript
leetcode problems and solutions
leetcode problems of the day
leetcode problems for beginners
leetcode problems easy
leetcode problems js
Introduction to the graph data structure
stack practice problems
stack practice problems gfg
leetcode stack questions
leetcode stack queue
stack hello world
MIn stack leetcode solution
Get Min at pop gfg
remove consecutive duplicates from a string
question asked in Google
off-campus placement
number of closed islands
Practice stack data structure
Stack in a data structure in Hindi
Stack Full playlist for Beginners
algorithms
graph
data structure
sorting algorithms
algorithm analysis
gate computer science preparation
programming languages
#stack #Leetcode #DSA
Комментарии