MCPcopy
hub / github.com/careercup/ctci / main

Method main

java/Chapter 3/Question3_4/Question.java:4–19  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

2
3public class Question {
4 public static void main(String[] args) {
5 // Set up code.
6 int n = 5;
7 Tower[] towers = new Tower[3];
8 for (int i = 0; i < 3; i++) {
9 towers[i] = new Tower(i);
10 }
11 for (int i = n - 1; i >= 0; i--) {
12 towers[0].add(i);
13 }
14
15 // Copy and paste output into a .XML file and open it with internet explorer.
16 //towers[0].print();
17 towers[0].moveDisks(n, towers[2], towers[1]);
18 //towers[2].print();
19 }
20}

Callers

nothing calls this directly

Calls 2

moveDisksMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected