I\'m studying time complexity in school and our main focus seems to be on polynomial time O(n^c) algorithms and quasi-linear time O(nlog
O(n^c)
O(nlog
You have n! lists, so you cannot achieve better efficiency than O(n!).
n!
O(n!)