Fixed solution for problem #35. Updated digits_rotation method according to
difference between rotation and permutation.