Capital One Interview Question

Program rotations to find shortest path of car.