Javascript – Calculate the minimum number of commands to return robot to starting point
I had this interview question : An input string controls the movement of a robot, "F" means move 1 step forward, "L" means turn 90 degrees to the left and "R" means turn 90 degrees to the right. E.g. "FLF"…