The idea is to recursively choose the least possible factor and add it into the list, while at the same time update `n`

. Currently, it is over 300ms! I tried to mimic other solutions by changing `i*i<=n`

but it does not work.

Can someone take a look?

```
public List<List<Integer>> getFactors(int n) {
List<List<Integer>> list = getFactors(n, n, 2);
if(list.isEmpty() || list.get(0).isEmpty()) return new LinkedList<List<Integer>>();
return list;
}
private List<List<Integer>> getFactors(int n, int rem, int min) {
List<List<Integer>> list = new LinkedList<List<Integer>>();
if(rem<=1) {
list.add(new LinkedList<Integer>());
return list;
}
for(int i=min; i<=rem && i<=n/min; i++) {
if(rem%i==0) {
List<List<Integer>> prev = getFactors(n, rem/i, i);
for(List<Integer> inner : prev) {
LinkedList<Integer> head = new LinkedList<Integer>(inner);
head.addFirst(i);
list.add(head);
}
}
}
return list;
}
```