Mindmap
searching and solving algorithms
Inhalt der Mindmap
searching and solving algorithms
standard searching algoithms
- binary search
- Begin with the mid element of the whole array as a search key
- if the value of the search key is equal to the item then return an index of the search key.
- Or if the value of the search key is less than the item in the middle of the interval, narrow the interval to the lower half.
- Otherwise, narrow it to the upper half. Repeatedly check from the second point until the value is found or the interval is empty.
- Or if the value of the search key is less than the item in the middle of the interval, narrow the interval to the lower half.
- if the value of the search key is equal to the item then return an index of the search key.
- Begin with the mid element of the whole array as a search key
- Start from the leftmost element of array and one by one compare the element we are searching for with each element of the array.
- If there is a match between the element we are searching for and an element of the array, return the index.
- . If there is no match between the element we are searching for and an element of the array, return -1.
- If there is a match between the element we are searching for and an element of the array, return the index.
- Start from the leftmost element of array and one by one compare the element we are searching for with each element of the array.
- binary search
Informationen
- Beschreibung
- Mindmap am searching and solving algorithms, erstellt von alfie feander am 04/10/2022.
- Erstellt von
- alfie feander · Okt 2022
- Aktualisiert
- 4 Okt 2022
- Aufrufe
- 2
- Bewertung