AI Gaming interview question

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