Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Algorithms Lesson 2: Insertion Sort

Loading...

Sign in or sign up now!
98,407
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Apr 14, 2009

http://xoax.net/

For this lesson, we explain and demonstrate graphically how to perform the insertion sort algorithm. For C++ insertion sort code, go to our lesson page at xoax.net.

Please submit all questions to our forum:
http://xoax.net/forum/

  • likes, 9 dislikes

Link to this comment:

Share to:

Top Comments

  • @myjunno Because in languages like C, arrays are indexed from 0 up, not 1 up. So the last element is indexed n-1, not n. If you used n, you would be accessing elements not in the array.

  • @Astrosisphere it may be better but that so called idiot is also trying there to teach you and you should appreciate his efforts as well

see all

All Comments (89)

Sign In or Sign Up now to post a comment!
  • I like the music :). Very relaxing and helps learning.

  • The animation helps so much!! It clears the idea so well , i bet in my exam i would be seeing a brown background with white spots dancing :P

  • Perhaps it may modify the actual algorithm's second half (but not how it works), I would recommend a brief explanation of the binary search and how that works. Then using the already sorted elements to find where to insert the number in question. Although in it's simplicity, there's nothing wrong with the explanation.

  • it helps me a lot! thanks man!

  • good !

  • this concl-

  • @fahadkhan2 Pseudocode is intended to be read by humans, and is not in any particular programming language. Hence the pseudocode is indexed from 1 up, since that is how humans count.

  • blew my mind!

  • awesome!!

    

  • @axeld93 : Then why does the indexing in the pseudocode mention starts from 1 not 0?

View all Comments »
Loading...

0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more