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

后端 未结 16 2267
栀梦
栀梦 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:53

    It means that the access takes constant time i.e. does not depend on the size of the dataset. O(n) means that the access will depend on the size of the dataset linearly.

    The O is also known as big-O.

提交回复
热议问题