Min Stack - LeetCode (Solution & Explanation | JavaScript)

preview_player
Показать описание
#min #stack #leetcode

Min Stack - LeetCode

Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.

push(x) -- Push element x onto stack.
pop() -- Removes the element on top of the stack.
top() -- Get the top element.
getMin() -- Retrieve the minimum element in the stack.

Topic(s): Stack, Design

Problem #: 155
Рекомендации по теме
Комментарии
Автор

Girl, don't apologize at the end because you explained it perfectly.

valeriesantiago
Автор

Hey Shirin,
You are awesome.
Just keep doing it.
Thanks a ton.

spardha-yug
Автор

very easy to understand thanks so much!

urmomapollo
Автор

That was a super helpful video, thanks!

kerteszkinga
Автор

Csn you do it with one array by declaring obj that contains two vals (val, min)

praveengautam
Автор

Nice explanation, I subscribed! Are you currently studying?

greggfineguitar
visit shbcf.ru