2.1 Algorithms Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What are the 3 principles of computational thinking?

A
  • Decomposition
  • Abstraction
  • Algorithmic thinking
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is an algorithm?

A

A sequence of instructions that perform a specific task when followed.

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

What does decomposition mean?

A

Breaking down a large problem into smaller ones that can be solved individually.

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

What does abstraction mean?

A

picking out the important piece of information and ignoring the details that don’t matter

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

What does algorithmic thinking mean?

A

A logical way from getting from the problem to the solution.

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

What does the rounded rectangle mean in a flowchart?

A

Start/stop

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

What does the parallelogram mean in a flowchart?

A

input/output

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

What does the rectangle mean in a flowchart?

A

processes - general instruction, processes and calculations

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

What does the diamond mean in a flowchart?

A

Decisions (yes and no)

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

What does the arrow show in a flowchart?

A

The direction of the flowchart.

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

What is a sub program?

A

Makes reference to another flowchart.

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

What are the 2 types of searching algorithms?

A

Binary and linear search.

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

What are the steps of linear search?

A

1) look at the first item in the unordered list
2) If that is the requested item then stop
3) if not look at the next item
4) repeat until you find the requested item in the list.

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

What are the steps of binary search?

A

1) find the middle value
2) if that is the item then stop
3) if not then compare the item that you are looking for to the middle one and get rid of the irrelevant side.
4) do this until the item is found.

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

In order to do a binary search, what does the list need to be?

A

The list has to be ordered

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

What is the steps of a bubble sort?

A

1) start at the beginning of the list.
2) Compare the first value in the list with the next one up. If the first value is bigger, swap the positions of the two vales
3) Move to the second value in the list
4) Keep going until there are no more items to compare
5) Go back to the start of the list.

17
Q

What is the steps of insertion sort?

A

1) Look at the second item of the list
2) Compare it to all the items before it and insert the number into the right place.
3) Repeat steps 2 for the following items until the last number in the list is in the right place.

18
Q

What is the steps of Merge sort?

A

1) split the list in 2) keep on splitting the the list until there is one item
3) first merge the halved sub lists in order
4) then merge of the sub list together into order.