Why a programmer would prefer O(N^3) instead of O(N^2)

前端 未结 7 1584
面向向阳花
面向向阳花 2021-01-07 16:57

I was studying for my final exam and there is a question in the archive that I cannot find its answer:

The order-of-growth of the running time of one

7条回答
  •  半阙折子戏
    2021-01-07 17:28

    Probably the #1 reason: because the O(N2) algorithm has enough higher constants that for the size of task being contemplated, the O(N3) version is faster.

提交回复
热议问题