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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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 .

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Merge sort

A

A list is split into individual lists these are then combined 2 lists at a time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

list

A

a set of data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what must the list be like for a Binary search?

A

In order

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly