how to solve combination based problems