Algorithms - Searching Flashcards
1
Q
Linear Search
A
Each item in the list is checked in order Linear search is where you go from the middle value then see if it is greater or less if otherwise move on to the next value and press stop
2
Q
Binary Search
A
Binary search is where you go put the data in to an ordered list then compare the middle value with the search value if it matches stop. If the value is larger then the search value remove all larger values otherwise if it is lower than the search value remove ALL smaller values .
3
Q
Merge sort
A
A list is split into individual lists these are then combined 2 lists at a time
4
Q
list
A
a set of data
5
Q
what must the list be like for a Binary search?
A
In order
6
Q
Merging lists
A
Split all elements into individual Put the smallest into a new list Compare the next elements of 1 list with the 2 element of the 2nd list Put the smallest into a new list Repeat until merged