• Want to help us with this year's BoS Trials?
    Let us know before 30 June. See this thread for details
  • Looking for HSC notes and resources?
    Check out our Notes & Resources page

Question on sorting HELP? (1 Viewer)

Weddas

Cooking Up a Storm
Joined
Sep 18, 2008
Messages
61
Location
Bathurst / Sydney
Gender
Male
HSC
2010
Hey guys and gals,

I was wondering if any one could enlighten me on the similarities of the Insersion sort, Bubble sort, and Selection sort to each other?

Looked all through the web and my textbook and there is not a word of how all these are the same to each other.

any help would be great.

Cheers

Weddas
 

xzane

New Member
Joined
Aug 11, 2009
Messages
5
Gender
Male
HSC
2010
Hey, i might not be too helpful here as i havent really studied these sorts yet in class but ill give it a try anyway.

Similarities:

  • Both Selection sort and insertion sorts are efficient for small sets of data.
  • Selection and Insertion sorts are similar is complexity
  • They all sort data lol
I'm not sure if that's any help, i carnt find any similarities for bubble sort.
 

SK2010

Member
Joined
Jul 5, 2009
Messages
45
Location
The Hills
Gender
Female
HSC
2010
this is off the topic but YOU HAVE EASY SUBJECT DAMN YOU!!!!!!!!!!!lol lol jks
 

sexisash

New Member
Joined
Oct 13, 2009
Messages
15
Gender
Female
HSC
2008
Insertion and Selection sort both require the 'shift' manoeuvre (when you insert an item into the array and 'shift' the rest down). This means they are quite inefficient on large amounts of data and are better done using 2 arrays (one for the unsorted pile, one for the sorted). Bubble sort is the only one where you only need one array to optimise the sort.

Both insertion and selection traverse the unsorted/sorted part to find the min/max values: bubble is the only one where this is not required (hence it is more suitable for large arrays).

If the array is already sorted, selection and bubble will 're-sort' it, whilst insertion will stop straight away.

That's about all the detail I think they'll want for that question
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top