Pregunta de entrevista de AI Gaming

How would you write a program to solve a Rubiks cube?