English subtitles

← Heap Sort - Intro to Algorithms

Get Embed Code
3 Languages

Showing Revision 3 created 05/24/2016 by Udacity Robot.

  1. This actually puts us in a really interesting situation.
  2. We can build a sorting algorithm
  3. out of the pieces that we just created.
  4. This is sometimes called heap-sort. You give it a (L).
  5. And what it does is it builds a heap out of (L),
  6. and then repeatedly, until there's no more elements left,
  7. it does remove.mn.
  8. So it gets the smallest and then the next smallest and then the next smallest
  9. until the list is exhausted.