MCPcopy
hub / github.com/MisterBooo/LeetCodeAnimation / push

Method push

problems/0155-min-stack/Code/1.java:12–23  ·  view source on GitHub ↗
(int x)

Source from the content-addressed store, hash-verified

10 }
11
12 public void push(int x) {
13 _data.add(x);
14 if (_min.isEmpty()){
15 _min.push(x);
16 }
17 else{
18 if (x > _min.peek()){
19 x = _min.peek();
20 }
21 _min.push(x);
22 }
23 }
24
25 public void pop() {
26 _data.pop();

Callers 9

findFirstGifFunction · 0.80
renderTopicIndexFunction · 0.80
appendSyncLogFunction · 0.80
failFunction · 0.80
warnFunction · 0.80
build-readme.jsFile · 0.80
decodeStringMethod · 0.80
build-readme.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected