Hacker News new | ask | show | jobs
by marvinjames 2615 days ago
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).
1 comments

Hmmmm good point!