Prime Factorization of a Number
Problem Statement How do we find all the prime factors of a given number? For example, when n = 12, the output should be [2, 3]. Notice that 1, 4, 6, 12 are also factors of 12 but they aren’t prime and therefore should be excluded from the output. Solution The following solution is …
Continue Reading