Algorithms Flashcards

1
Q

What’s abstraction?

A

Removing unnecessary information to focus on the necessary information, to simplify an issue

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

Why is abstraction used?

A

Simplifies a problem by making it less complex, making it easier to resolve

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

What is decomposition?

A

Breaking down a problem into smaller parts to make it easier to understand

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

Why is decomposition used?

A

More people can work on the problem
Each part of the problem can be individually tested

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

What is algorithmically thinking?

A

The logical steps are followed to solve the problem

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

What is an algorithm?

A

A set of instructions presented in a logical sequence

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

How does a linear search work?

A

Each item is searched from start to end/ till item is found
Not efficient for large lists

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

How does a binary search work?

A

Data must be sorted
Finds the midpoint and checks if item = wanted item
Then decides if its greater or smaller and discards one of the halves
This repeated until the item is found

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

How does a merge sort work?

A

Divides a list of items in half again and again until each item is individual
The items are then put in pairs and reordered
The items are merged again and reordered until the whole list is ordered

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

How does bubble sort work?

A

Each item is compared with the other on the right and swapped if wrongly ordered, this will be repeated going down the list till it’s ordered

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

How does insertion sort work?

A

Items are split, the left side is ordered and right is unordered
An item from the right side is added to the left and order, this repeated till the list is ordered

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