Mindmap
2.1.3 Searching and Sorting Algorithms JS
Inhalt der Mindmap
2.1.3 Searching and Sorting Algorithms JS
Binary Search
- Find the middle item in an ordered list
- If this is the item you were looking for then stop the search as you've found it
- If not compare the item you were looking for to the middle item
- If it comes before the middle item get rid of the second half of the list
- If it comes after the middle item get rid of the first half of the list
- you'll be left with a list that is half the size of the original list
- Repeat the previous steps and you will get an even smaller list of data
- Keep going until you find the item you are looking for
- Repeat the previous steps and you will get an even smaller list of data
- you'll be left with a list that is half the size of the original list
- Binary search uses the formula: Midpoint = (First + Last) Div 2. It does this to calculate the midpont
- Find the middle item in an ordered list
Linear Search
- Look at the first item in an unordered list
- (It can be used on an unordered
- If this is the item you were looking for then stop the search as you have found it
- Repeat the previous steps on each individual item until you have found the item you want
- Look at the first item in an unordered list
Bubble Sort
Merge Sort
Insertion Sort
Informationen
- Beschreibung
- GCSE Chemistry Mindmap am 2.1.3 Searching and Sorting Algorithms JS, erstellt von James Spencer am 04/10/2022.
- Erstellt von
- James Spencer
- Aufrufe
- 1
- Bewertung