Description
Numbers can be regarded as product of its factors. For example,
1 | 8 = 2 x 2 x 2; |
Write a function that takes an integer n and return all possible combinations of its factors.
Note:
- You may assume that n is always positive.
- Factors should be greater than 1 and less than n.
Example 1:
1 | Input: 1 |
Example 2:
1 | Input: 37 |
Example 3:
1 | Input: 12 |
Example 4:
1 | Input: 32 |
Solution
1 | class Solution { |
Beat 100% Solution!!!
1 | class Solution { |
3 4 5