@@ -0,0 +1,484 @@
+// https://community.topcoder.com/stat?c=problem_statement&pm=1791%0A%0Apublic class TireRotation %7B%0A%09public static int getCycle(String initial, String current) %7B%0A%09%09if (initial.equals(current)) %7B%0A%09%09%09return 1;%0A%09%09%7D%0A%09%09%0A%09%09int phase = 1;%0A%09%09%0A%09%09while (!(initial.equals(current)) && phase %3C= 4) %7B%0A%09%09%09initial = String.valueOf(new char%5B%5D %7B%0A%09%09%09%09initial.charAt(3),%0A%09%09%09%09initial.charAt(2),%0A%09%09%09%09initial.charAt(0),%0A%09%09%09%09initial.charAt(1),%0A%09%09%09%7D);%0A%09%09%09phase++;%0A%09%09%7D%0A%09%09%0A%09%09return (phase %3C= 4) ? phase : -1;%0A%09%7D%0A%7D%0A

Create TireRotation.java