What does “O(1) access time” mean?

后端 未结 16 2247
栀梦
栀梦 2020-11-28 18:21

I have seen this term \"O(1) access time\" used to mean \"quickly\" but I don\'t understand what it means. The other term that I see with it in the same context is \"O(n) ac

16条回答
  •  借酒劲吻你
    2020-11-28 18:32

    "Big O notation" is a way to express the speed of algorithms. n is the amount of data the algorithm is working with. O(1) means that, no matter how much data, it will execute in constant time. O(n) means that it is proportional to the amount of data.

提交回复
热议问题