MCPcopy Index your code
hub / github.com/careercup/ctci / main

Method main

java/Chapter 14/Question14_6/Question.java:8–26  ·  view source on GitHub ↗

@param args

(String[] args)

Source from the content-addressed store, hash-verified

6 * @param args
7 */
8 public static void main(String[] args) {
9 int size = 10;
10 CircularArray<String> array = new CircularArray<String>(size);
11 for (int i = 0; i < size; i++) {
12 array.set(i, String.valueOf(i));
13 }
14
15 array.rotate(3);
16 for (int i = 0; i < size; i++) {
17 System.out.println(array.get(i));
18 }
19
20 System.out.println("");
21
22 array.rotate(2);
23 for (String s : array) {
24 System.out.println(s);
25 }
26 }
27
28}

Callers

nothing calls this directly

Calls 3

setMethod · 0.95
rotateMethod · 0.95
getMethod · 0.95

Tested by

no test coverage detected