2.1 Algorithms Flashcards

1
Q

What is an algorithm?

A

A sequence of logical instructions for carrying out a task.

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

What is a program?

A

A sequence of instructions for a computer.

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

What is abstraction?

A

Ignoring unnecessary detail in a problem in order to focus on the important and relevant information.

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

What is computational thinking?

A

Solving problems logically, in a way that can be understood by humans and computers.

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

What is decomposition?

A

Breaking a complex problem down into smaller sub problems to make it easier to solve

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

What is sequence?

A

The order in which the steps are executed.

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

What is pattern recognition?

A

Finding similarities and patterns in order to solve complex problems more efficiently.

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

What is selection?

A

Decision making that decides which path the algorithm will take next.

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

What is iteration?

A

Repeating steps.

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

What is definite iteration?

A

Repeating steps a set number of times.

eg for loops

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

What is a linear search?

A

Goes through data one by one to find the required item

+ Works with an unordered list
- Slower/less efficient than other searching algorithms

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

What is a binary search?

A

Compares the required item to middle of the list, discards the irrelevant half of the list, repeats until the required item is found

+ Fast/efficient

  • Only works in an ordered list
  • Only works with numbers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a bubble sort?

A

Looks at the first pair of data, swaps them round if in the wrong order, repeats with next pair

+ Doesn’t use much memory

  • Doesn’t cope well with large lists
  • Slower/less efficient than merge sort
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a merge sort?

A

“Divide and conquer” method, splits list in half and half again until lists contain only one value, merges small lists back together in the right order.

+ Quick/efficient
- Uses more memory than other sorting algorithms

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

What is an insertion sort?

A

Looks at the second item in the list, compares it to all the items before it, repeats with the next item

+ Doesn’t use much memory
- Doesn’t cope well with large lists

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