Does Big O Measure Memory Requirments Or Just Speed?

前端 未结 8 1755
孤城傲影
孤城傲影 2021-02-18 16:08

I often here people talk about Big O which measures algorithms against each other

Does this measure clock cycles or space requirements.

If people want to contras

8条回答
  •  北恋
    北恋 (楼主)
    2021-02-18 16:14

    Typically it's the number of operations, which translates to speed. Usually, algorithms differ more in speed than in memory usage. However, you will see the O() notation used for memory use, when appropriate.

提交回复
热议问题