Does Big O Measure Memory Requirments Or Just Speed?

前端 未结 8 1777
孤城傲影
孤城傲影 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:29

    While normally algorithms compete on time, then I would normally assume that any O statement was time. However, it's perfectly valid to also compare space. O can be used for any measurement- we just normally use speed because it's normally the most important.

提交回复
热议问题