Are there any real O(n^n) algorithms?

后端 未结 5 728
醉梦人生
醉梦人生 2021-02-01 03:19

Is there any real Algorithm with a time complexity O(n^n), that isn\'t just a gimmick?

I can create such an Algorithm, like computing n^n in O(n^n) / Θ(n^n):

<         


        
5条回答
  •  北荒
    北荒 (楼主)
    2021-02-01 03:40

    There are computations (for instance, tetration) where the output size is O(nn). It's kind of hard to compute them with time complexity less than O(nn).

提交回复
热议问题