prob_24 solve permutation recursive