How to solve permutation and combination questions