Results 1 to 2 of 2

Math Help - Different Sorts (Bubble, Insertion...)

  1. #1
    Member
    Joined
    Sep 2006
    Posts
    221

    Different Sorts (Bubble, Insertion...)

    From the following values,

    a_1, a_2, a_3, a_4, a_5, a_6, a_7, a_8, where

    a_1 = 37
    a_2 = 21
    a_3 = 5
    a_4 = 19
    a_5 = 8
    a_6 = 16
    a_7 = 24
    a_8 = 35

    Show the contents of the above after the 4th iteration of the following:

    a.) insertion sort
    b.) bubble sort
    c.) selection sort

    And then show 4 interactions (that is, trees), of the Tournament Sort of the same array above.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Member Glaysher's Avatar
    Joined
    Aug 2006
    From
    Newton-le-Willows
    Posts
    224
    Quote Originally Posted by Ideasman View Post
    From the following values,

    a_1, a_2, a_3, a_4, a_5, a_6, a_7, a_8, where

    a_1 = 37
    a_2 = 21
    a_3 = 5
    a_4 = 19
    a_5 = 8
    a_6 = 16
    a_7 = 24
    a_8 = 35

    Show the contents of the above after the 4th iteration of the following:

    a.) insertion sort
    b.) bubble sort
    c.) selection sort

    And then show 4 interactions (that is, trees), of the Tournament Sort of the same array above.
    Only know bubble sort, assuming ascending order

    37 21 5 19 8 16 24 35
    21 37
    21 5 37
    21 5 19 37
    21 5 19 8 37
    21 5 19 8 16 37
    21 5 19 8 16 24 37
    21 5 19 8 16 24 35 37
    5 21
    5 19 21
    5 19 8 21
    5 19 8 16 21
    5 19 8 16 21 24 35 37
    5 8 19
    5 8 16 19 21 24 35 37
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. insertion and quicksort check
    Posted in the Discrete Math Forum
    Replies: 6
    Last Post: August 28th 2010, 04:41 AM
  2. Big O (I think) & Sorts
    Posted in the Discrete Math Forum
    Replies: 2
    Last Post: July 30th 2009, 05:44 PM
  3. An integration of sorts.
    Posted in the Calculus Forum
    Replies: 5
    Last Post: September 10th 2008, 02:52 AM
  4. all sorts of algebra questions
    Posted in the Algebra Forum
    Replies: 4
    Last Post: July 16th 2007, 05:33 AM

Search Tags


/mathhelpforum @mathhelpforum