Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/careercup/ctci
/ push
Method
push
java/Chapter 3/Question3_2/StackWithMin2.java:12–17 ·
view source on GitHub ↗
(int value)
Source
from the content-addressed store, hash-verified
10
}
11
12
public
void
push(
int
value){
13
if
(value <= min()) {
14
s2.push(value);
15
}
16
super.push(value);
17
}
18
19
public
Integer pop() {
20
int
value = super.pop();
Callers
1
main
Method · 0.95
Calls
1
min
Method · 0.95
Tested by
no test coverage detected