selection sort using java

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
6,937
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Mar 13, 2009

No description available.

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 3 dislikes

Link to this comment:

Share to:

Uploader Comments (chandubabacoder)

  • Great vid !

    Would there be any difference if I were to change the following line in the selection sort

    for(int i = 0 ; i < a.length ; i++)

    instead of

    i < a.length - 1;

  • thank u!

    See the inner loop... its starting from i+1. So if number of numbers is suppose 10 (0 to 9), it would check for numbers in index i=8 to j=9. But if you write that loop you pointed out then it would check for i=9 and j=10.. but that wont happen cause j<10 in the condition of second loop.

    It wont make any difference but it won't be efficient. I might not be clear. If any problem please ask again :)

see all

All Comments (5)

Sign In or Sign Up now to post a comment!
  • where the fuck is the sound man! how are we supposed to learn from this!

Loading...
Alert icon
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