![]() |
|
#1
|
|||
|
|||
Differencese in Sorts?Okay im just woking on some basic functions using arrays.
I got my bubble sort to work using: CPP / C++ / C Code:
I belive that is a bubble sort? However i have to right a function using selection sort, and im not sure what the difference is between the 2? Baisically i have this: SelectionSort
Can someone please help me understand the difference? |
|||
|
#2
|
|||
|
|||
Re: Differencese in Sorts?can anyone help?
|
|
#3
|
|||
|
|||
Re: Differencese in Sorts?Bubble sort swaps any two values that are in the wrong order, in place. Selection sort, on each iteration, goes through and finds the minimum value in the array, and swaps it with the first value in the array. And then in subsequent iterations, it starts looking through array after the values it has already put there. Google and Wikipedia will explain these much better than I can.
|
Recent GIDBlog
Not selected for officer school by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Bubble Sorts with 2d Arrays | y2l | C Programming Language | 5 | 14-Apr-2006 13:01 |
| Bubble/Selection sorts | the_crazyman | C++ Forum | 0 | 25-Jan-2005 08:15 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The