MCPcopy Create free account
hub / github.com/TheAlgorithms/Java / main

Method main

src/main/java/com/thealgorithms/strings/Rotation.java:13–19  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

11 }
12
13 public static void main(String[] args) {
14 assert rotation("abcdef", 2).equals("cdefab");
15
16 char[] values = "abcdef".toCharArray();
17 rotation(values, 2);
18 assert new String(values).equals("cdefab");
19 }
20
21 /**
22 * Move {@code n} characters in front of given string to the end of string

Callers

nothing calls this directly

Calls 2

rotationMethod · 0.95
equalsMethod · 0.45

Tested by

no test coverage detected