Find all the factors of a given number

O(N) solution