[英]Time complexity of accessing collections.deque length
What is the time complexity of calling Python's built-in len()
function on collections.deque
? 在
collections.deque
上调用Python的内置len()
函数的时间复杂度是多少? I expect it to be O(1), but I haven't found any confirmation of this fact. 我希望它是O(1),但我没有找到任何关于这一事实的确认。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.