Topic 1-Algorithms Flashcards

1
Q

What is an algorithm?

A

An algorithms is a series of step by step instructions to complete a task.

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

What is abstraction?

A

Abstraction is removing any unnecessary details to focus on the relevant parts and make the problem more simple.

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

What is decomposition?

A

Decomposition is breaking down a complex problem into smaller, more manageable, subproblems. Each sub-solution can be combined to solve the problem.

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

What is pattern recognition?

A

Pattern recognition is finding cimilarities between problems that are decomposed to help us solve more complex problems with more efficiency.

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

Name an example of abstraction.

A

A tube map details tube lines, services and the stations but does not feature above ground landmarks or shops to make planning a journey easier, this means it is an example of abstraction.

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

Name an example of decomposition.

A

A bicycle is an example of decomposition as all of the complex details come together to make it rideable.

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

What is computational thinking?

A

Computational thinking is combining pattern recognition, algorithms, abstraction and decomposition to complete a task.

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

Name an example of computational thinking.

A

Cleaning your room.

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

What is an input?

A

Indicates a user will be inputting something.

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

What is an output?

A

Indicates that an output will appear on the screen.

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

What is a for iteration?

A

A counting iteration that has a defined set of loops. This means it is definite.

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

What are while and repeat until iterations?

A

They are indefinite.

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

What is a while loop?

A

Iteration with condition at start.

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

What is a repeat until loop?

A

Iteration with condition at end.

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

What is the difference between a while loop and a repeat until loop?

A

A while loop may never be executed however with a repeat until loop the code is always executed atleast once.

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

What are trace tables used for?

A

Used to check code/algorithms.

17
Q

What are the pros and cons of a bubble sort?

A

+less storage space

-takes longer as it is one by one

18
Q

What are the pros and cons of a merge sort?

A

+quicker

-more storage space

19
Q

Explain the bubble sort?

A

Compares two pieces of data and switches them depending on which one has a greater value.

20
Q

Explain the merge sort?

A

Divideand conquer technique that only checks half of the data.

21
Q

Explain the linear search?

A

uses brute force to check every piece of data sequentially from left to right.

22
Q

Explain the binary search?

A

Half n half method where the data is cut in half and one half is discarded and so on.

23
Q

What are the pros and cons of linear search?

A

+good for smaller or unsorted data sets

-can take longer

24
Q

What are the pros and cons of binary search?

A

+good for larger or sorted data sets

-can’t do unsorted data sets

25
Q

If John made a brochure advertising his concert, what abstraction and decomposition could he use?

A

Decomposition-Break it down into sections and headings with different bits of information.

Abstraction-Do not need to tell them exact time to the second the concert starts.