@@ -0,0 +1,452 @@
+// https://community.topcoder.com/stat?c=problem_statement&pm=13000%0A%0Apublic class OneDimensionalRobotEasy %7B%0A%09public static int finalPosition(String commands, int A, int B) %7B%0A%09%09int finalPosition = 0;%0A%09%09%0A%09%09for (int i = 0; i %3C commands.length(); ++i) %7B%0A%09%09%09if (commands.charAt(i) == 'L' && ( ( finalPosition - 1 ) %3E= (-A) ) ) %7B%0A%09%09%09%09finalPosition--;%0A%09%09%09%7D%0A%09%09%09else if ( (finalPosition+1) %3C= B ) %7B%0A%09%09%09%09finalPosition++;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09%0A%09%09return finalPosition;%0A%09%7D%0A%7D%0A

Create OneDimensionalRobotEasy.java