filmov
tv
Stack & Queue 5: Get minimum element from stack | Must Do Coding Questions | GeeksForGeeks

Показать описание
This video contains Must Do Coding Questions for Companies like Amazon, Microsoft, Adobe, …
from geeksforgeeks platform.
website link:
Topics covered in this video series are:
1.Arrays
2.String
3.Linked List
4.Stack and Queue
5.Tree and BST
6.Heap
7.Recursion
8.Hashing
9.Graph
10.Greedy
11.Dynamic Programming
12.Divide and Conquer
13.Backtracking
14.Bit Magic
Stack and Queue:
5: Get minimum element from stack :
You are given N elements and your task is to Implement a Stack in which you can get minimum element in O(1) time.
Example 1:
Input:
push(2)
push(3)
pop()
getMin()
push(1)
getMin()
Output: 3 2 1
Explanation: In the first test case for
query
push(2) the stack will be {2}
push(3) the stack will be {2 3}
pop() poped element will be 3 the stack will be {2}
getMin() min element will be 2
push(1) the stack will be {2 1}
getMin() min element will be 1
Code Link:
Intro Music :
from geeksforgeeks platform.
website link:
Topics covered in this video series are:
1.Arrays
2.String
3.Linked List
4.Stack and Queue
5.Tree and BST
6.Heap
7.Recursion
8.Hashing
9.Graph
10.Greedy
11.Dynamic Programming
12.Divide and Conquer
13.Backtracking
14.Bit Magic
Stack and Queue:
5: Get minimum element from stack :
You are given N elements and your task is to Implement a Stack in which you can get minimum element in O(1) time.
Example 1:
Input:
push(2)
push(3)
pop()
getMin()
push(1)
getMin()
Output: 3 2 1
Explanation: In the first test case for
query
push(2) the stack will be {2}
push(3) the stack will be {2 3}
pop() poped element will be 3 the stack will be {2}
getMin() min element will be 2
push(1) the stack will be {2 1}
getMin() min element will be 1
Code Link:
Intro Music :
Queues in 3 minutes
Introduction to Stacks and Queues (Data Structures & Algorithms #12)
Data Structures: Stacks and Queues
Data Structures 101: How Queue and Stack work?
5. Get minimum element from stack | Stack and Queue | Python | GFG | Must Do Coding Questions
Learn Stack data structures in 10 minutes 📚
Learn Queue data structures in 10 minutes 🎟️
Stack & Queue 5: Get minimum element from stack | Must Do Coding Questions | GeeksForGeeks
5 stack vs the solo q experience
This is the Most Asked FAANG Interview Question! - Two Sum - Leetcode 1
5 Queue Intro Data Structure Stack & Queues JavaScript
Stack and Queue
L5. Next Greater Element | Stack and Queue Playlist
Stack Implementation using a Single Queue
Python Stacks - Python Tutorial for Absolute Beginners | Mosh
Stacks vs Queues
Important Questions Of Stack And Queue #datastructures #viral #shortsfeed
Introduction to Stacks
This Item Can Make You MILLIONS on the Donut SMP!
Implement Queue Using Two Stacks: 5 Fast Strategies to Extra Cash/Week | InterviewEdge
VALORANT are changing 5 stacks again...
Stack & Queue | Programming & Data Structures | GATE 2023 CRASH COURSE
Stack & Queue
Where did she hide it?
Комментарии