Searching And Sorting Flashcards

1
Q

What is an algorithm?

A

A set of step by step instructions that describes how to get something done or solve a problem

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

What can algorithms be designed by ?

A

Pseudocode and flowcharts

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

1st feature of linear searches ?

A

Moves through a list one at a time, starting on the left

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

2nd feature of linear searches ?

A

Very simple to create and run

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

3rd feature if linear searches ?

A

The list doesn’t have to be in order

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

4th feature of linear searches?

A

Very slow, inefficient and takes a lot of comparisons

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

Binary search feature 1

A

Looks at the middle number .
Is it the target number?
Is it greater or less?

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

Binary search feature 2

A

Half of the list is discarded If it’s too small or large

And the process starts again

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

Binary search feature 3

A

Very efficient and much quicker than linear search , uses less comparisons

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

Binary search feature 4

A

The list must be in order for it to work

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

Bubble search feature 1

A

Moves the a list, comparing two numbers at a time

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

Bubble sort feature 2

A

Numbers are swapped if the left number is greater

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

Bubble sort feature 3

A

The process is repeated until the list is in order

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

Bubble sort feature 4

A

Simple to create and run

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

Bubble sort feature 5

A

Slow, inefficient and requires a large number of comparisons

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

Insertion sort feature 1

A

Puts the first number into a sorted list

17
Q

Insertion sort feature 2

A

Compared the rest of the numbers in the unsorted list with the sorted list,
one by one
Inserting them into the correct place

18
Q

Insertion sort feature 3

A

More complicated than bubble sort
Much faster
Requires less comparisons