Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
marvinjames
· 7y ago · 0 comments
Best case for heapsort is actually O(n). Build heap always takes O(n). Then e.g. when all keys are the same, the max-heapify call will take O(1) instead of O(logn).
Comments
[–]
gameguy43
7y ago
Hmmmm good point!