Rubik's cube solver algorithm