Skip to content

155. Min Stack #66

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 10, 2019
Merged

155. Min Stack #66

merged 1 commit into from
Jan 10, 2019

Conversation

zwfang
Copy link
Collaborator

@zwfang zwfang commented Jan 10, 2019

https://leetcode.com/problems/min-stack/

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.

@zwfang zwfang added Easy Coefficient of difficulty easy stack LIFO, a stack is an abstract data type that serves as a collection of elements (push, pop) labels Jan 10, 2019
@codecov
Copy link

codecov bot commented Jan 10, 2019

Codecov Report

Merging #66 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #66      +/-   ##
=========================================
+ Coverage   99.29%   99.3%   +0.01%     
=========================================
  Files         107     108       +1     
  Lines        1830    1850      +20     
=========================================
+ Hits         1817    1837      +20     
  Misses          9       9              
  Partials        4       4
Impacted Files Coverage Δ
src/0155_min_stack/min_stack.go 100% <100%> (ø)

@zwfang zwfang merged commit 3fa279a into master Jan 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Easy Coefficient of difficulty easy stack LIFO, a stack is an abstract data type that serves as a collection of elements (push, pop)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant