Pergunta de entrevista da empresa AI Gaming

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