Mindmap
Sorting Algorithms

Inhalt der Mindmap
Sorting Algorithms
BUBBLE SORT
- This compares two adjacent values in the data set and swaps then if necessary. When it has worked from one end of a data seet to the other, it has made ONE full pass. It keeps doing this until all the data is in acsending order.
- ADVANTAGES
- Hardly any extra memory is needed to temporarily hold data during sorts
- Very few lines of code is required so it is easier to program
- DISADVANTAGES
- Unsuitable for large data sets because it will take a long time to sort it
- Processor time is used inefficiently because some data items are examined multiple times
QUICKSORT
- This is very efficient and is good for sorting a large data collection. It picks a pivot which is usually in the middle of the data. Orders data which is smaller than the pivot on one end of the pivot and data which is larger than the pivot on the other side. It then performs another sort in the two subsets of data and then when theyb are ordered, put them back together with the pivot in the middle.
- ADVANTAGES
- It is more efficient and faster, than the bubble sort
- DISADVANTAGES
- Loses efficiency what data is almost in order or in reverse order
- Code is more difficult to understand and implement
SELECTION SORT
- Breaks the data collection into two part: a sorted part and unsorted part (sorted part will be empty at the beginning) During each pass, the smallest number from the unsorted part will be placed at the rightmost edge or the sorted part
- ADVANTAGES
- Hardly any extra memory is needed to temporarily hold data during sorts
- Very few lines of code is required so it is easier to program
- DISADVANTAGES
- Loses efficiency what data is almost in order or in reverse order
- Code is more difficult to understand and implement
Searching Algorithms
- Linear
- Starts at one end of a data collection and works its way to the other, examining each data item in the collection. It looks for a number in a collection of data until it finds the number its looking for
- Advantage
- The only option for searching unsorted data
- Disadvantage
- It would take a long time to search a large data structure
- Binary
- This only works when the data structure is sorted. Instead of starting at one end, it starts in the middle of the data. If the number we want is bigger than the middle number, it will be found to the right of the middle number or vice versa
- Advantage
- Far faster and more efficient than a linear search
- Disadvantage
- It requires the data to be sorted otherwise it will not work
- Linear
Bilder und Dateien der Mindmap
Informationen
- Beschreibung
- Mindmap am Sorting Algorithms, erstellt von Matty Collinson am 06/11/2015.
- Erstellt von
- Matty Collinson
- Aufrufe
- 2
- Bewertung



