Insertion_sort Program

July 15, 2009 by admin
Filed under: Newest Projects 

write a function insertion_sort that sorts strings. The parameters are an array of pointers to cahr and the number of strings to sort. Use the following algorithm to sort

array [ 0 ],…….., array [ SIZE -1].

1)Initialize COUNT to 1.
2)Repeat step 3 through 7 until COUNT equals SIZE.
3)Set IND to COUNT.
4)Repeat steps 5 and 6 as long as IND>or equal 1 and.
Array [IND] < array [IND-1].
5)Swap array [IND] and array [IND-1].
6)Decrement IND by 1.
7)Increment COUNT by 1.

Use only pointer syntax. As sample input, use an array of 20 character strings.
And also modify insertion_sort so that it sorts by moving pointers rather than by moving the string.

Go to Source

Post similar project on sosexpert.com



Related Projects

  • May 25, 2009 -- C Help
    write a function insertion_sort that sorts strings. The parameters are an array of pointers to cahr ...
  • November 14, 2009 -- Copy files algorithm by VictorCob
    I need a coder to write 2 functions in Delphi. 1. The function will take as parameter a folder na...
  • July 30, 2009 -- SMTP Email to HTTP assistance by donaldjackson
    I need someone to assist me with setting up a mail account which automatically calls a PHP script. ...
  • July 10, 2009 -- AI Based Report
    Wanted to write AI based algorithm WHen I sendin a data and select parameters it should use AI base...
  • November 16, 2009 -- Blog Poster Software
    Project Description: Platform : .net framework Simple windows software needed for : Two main featu...

Comments

Comments are closed.

Better Tag Cloud
goingup