A Basic Quiz on Algorithms #1

  • + 1 comment

    There is an algorithm, invented by Floyd, that heapifies'' an array in O(n). It does it in a bottom-up manner, if you just insert each of the elements in a heap one by one of course it's O(n log n).

    http://www.cs.umd.edu/~meesh/351/mount/lectures/lect14-heapsort-analysis-part.pdf