added createCombinations method to generate all combinations of an array
correctly solved problem 47 by fixing and then optimizing getPrimeFactors function