Example of a factorial time algorithm O( n! )

前端 未结 4 715
情深已故
情深已故 2020-12-08 06:36

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

4条回答
  •  既然无缘
    2020-12-08 07:06

    Generate all the permutations of a list

    You have n! lists, so you cannot achieve better efficiency than O(n!).

提交回复
热议问题