python3-cookbook icon indicating copy to clipboard operation
python3-cookbook copied to clipboard

1.4与1.5节关于heapq.heappop()复杂度的问题

Open lufo816 opened this issue 9 years ago • 3 comments

堆的pop和push的复杂度不是O(logn)吗?为什么文中写的是O(n)?

lufo816 avatar Nov 15 '15 06:11 lufo816

我查了下英文原文是O(logN)

lufo816 avatar Nov 15 '15 06:11 lufo816

谢谢指出

yidao620c avatar Nov 16 '15 01:11 yidao620c

已经更正过来

yidao620c avatar Nov 16 '15 01:11 yidao620c