Algorithms Flashcards

1
Q

What is an algorithm?

A

A process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer

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

What do searching algorithms prevent you having to do

A

Search algorithms prevent you from having to look through lots of data to find the information you are serving for

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

What are the 2 main types of searching algorithms?

A

Serial search and binary search

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

What is serial search?

A

The most basic kind of search is serial search. The search starts with the first item and then moves to each item in turn, until either a match is found or it reaches the end of the data with no match found

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

What is binary search?

A

Binary search is a father method of searching for an item that is in an ordered list. Binary search takes the data and keeps dividing it in half until it finds the item itโ€™s looking for.

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

What is an advantage of serial search?

A

It is very simple which makes it easy to write a computer program to carry out.

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

What is an advantage of binary search

A

It is much quicker that serial search.

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

What is a disadvantage of serial search?

A

It is very slow.

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

What is a disadvantage of binary search?

A

You can only use binary search if the data is sorted into an order.

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

Why do we need sorting algorithms?

A

A sorting algorithm will put items in a list in order.

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

Name the 2 main types of sorting algorithms

A

Bubble sort and bucket sort

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

What is bubble sort?

A

A bubble sort algorithm goes through a list of data a number of times, comparing two items that are side by side to see which is out of order.

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

What is bucket sort?

A

A bucket sort algorithm separates a list of data into different collections of data called โ€˜bucketsโ€™. Each bucket is sorted and the final data put back together again!

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

What is an advantage of bubble sort?

A

It is very simple as there is only one task to perform.

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

What is an advantage of bucket sort?

A

It is quicker to run and reduces the number of comparisons that need to be carried out.

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

What is a disadvantage of bubble sort?

A

It takes a very long time to run

17
Q

What is a disadvantage of bucket sort?

A

It is quite complicated.