Example of a factorial time algorithm O( n! )

前端 未结 4 721
情深已故
情深已故 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:03

    Traveling Salesman has a naive solution that's O(n!), but it has a dynamic programming solution that's O(n^2 * 2^n)

提交回复
热议问题