Selection Sort

This is a discussion on Selection Sort within the C++ Programming forums, part of the General Programming Boards category; I seriously need help with writing a program to do selection sort as a indirect sort. Read in 25 names ...

  1. #1
    Registered User
    Join Date
    Sep 2002
    Posts
    1

    Selection Sort

    I seriously need help with writing a program to do selection sort as a indirect sort. Read in 25 names and print them out with a heading, sort indirectly and print sorted list with heading. If you can assist me with this it would very appreciated. Thank You.

  2. #2
    I lurk
    Join Date
    Aug 2002
    Posts
    1,361
    Homework?
    Did you make an attempt at it yet?

  3. #3
    Blank
    Join Date
    Aug 2001
    Posts
    1,034
    Look at the array
    4 3 4 2 1 2 4 5 6 7
    All you need to do is find the smallest value of
    3 4 2 1 2 4 5 6 7 and then swap that with 4
    Then find the smallest value of 4 2 1 2 4 5 6 7 and swap
    that with 3. You continue doing this until the array is totaly
    sorted.

  4. #4
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    ya, I have no doubt this is homework. Gotta try it first. Get some code up here to show you've done something on your own and you'll get people to help.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Insertion and selection sort
    By Dashing Boy in forum C Programming
    Replies: 4
    Last Post: 08-29-2006, 04:42 PM
  2. Selection Sort problem #2
    By Twigstar in forum C++ Programming
    Replies: 7
    Last Post: 07-11-2005, 07:27 PM
  3. Selection Sort help
    By Twigstar in forum C++ Programming
    Replies: 5
    Last Post: 06-26-2005, 08:39 PM
  4. HELP with file input with array, selection sort...
    By MyglyMP2 in forum C++ Programming
    Replies: 1
    Last Post: 04-27-2005, 10:24 PM
  5. selection sort records of chars
    By hew in forum C++ Programming
    Replies: 8
    Last Post: 04-23-2002, 03:49 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21