Mindmap
Search and Sorting
Inhalt der Mindmap
Search and Sorting
Linear Search
- Each item in a list is checked in order from the start of the list until the item is found.
- A linear search allows us to search for values even if the values are not in order.
Binary Search
- The number will be put into order. Once they're in order it will count how many cards there are starting with 0 then half it until it finds the number.
- Binary search is an efficient algorithm for finding an item from a sorted list of items.
Bubble Sort
- The algorithm starts at the beginning of the data set. It compares the first two value, and if the first is greater than the second, it swaps them.
- It continues doing this for each pair of adjacent values to the end of the data set. It then starts again with the first two elements, repeating until no swaps have occurred on the last pass
Merge Sort
- Splits sub-list in two until you reach pair of values
- Sort/Swap pair of values if needed
- Merge and sort sub-lists and repeats process until you merge to the full list
Insertion Sort
- An insertion sort compares values in turn, starting with the second value in the list. If this value is greater than the value to the left of it, no changes are made.
- Otherwise this value is repeatedly moved left until it meets a value that is less than it. The sort process then starts again with the next value.
Informationen
- Beschreibung
- Mindmap am Search and Sorting, erstellt von Tyler Kirk am 24/10/2024.
- Erstellt von
- Tyler Kirk
- Aufrufe
- 1
- Bewertung