Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/careercup/ctci
/ moveTopTo
Method
moveTopTo
java/Chapter 3/Question3_4/Tower.java:25–28 ·
view source on GitHub ↗
(Tower t)
Source
from the content-addressed store, hash-verified
23
}
24
25
public
void
moveTopTo(Tower t) {
26
int
top = disks.pop();
27
t.add(top);
28
}
29
30
public
void
print() {
31
System.out.println(
"Contents of Tower "
+ index() +
": "
+ disks.toString());
Callers
1
moveDisks
Method · 0.95
Calls
2
pop
Method · 0.45
add
Method · 0.45
Tested by
no test coverage detected