Solving Permutation or Combination Problems