Unit 6: Algorithms Flashcards

1
Q

What is an Algorithm?

A

Set of instructions for how to solve a problem/perform a task.

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

What are the key techniques of Computational Thinking?

A

Abstraction
Decomposition
Algorithmic Thinking

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

What is Abstraction?

A

Picking out the important parts of information and ignoring the specific details that aren’t relevant.

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 into smaller problems and solving each one individually.

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

What is Algorithmic Thinking?

A

A logical way of getting from the problem to the solution. If the steps you take to solve a problem follow an algorithm, they can be reused and adapted to solve similiar problems in the future.

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

What is Pseudocode?

A

Not an actual programming language but shows a similiar structure and reads like one.
It is used to show an algorithm’s steps clearly without worrying about finer details (syntax) of any particular programming language.

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

What does the rectangle with rounded corners represent?

Flowcharts

A

The beginning and end of the algorithm (Sometimes called terminals)

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

What does the parallelogram represent?

Flowcharts

A

Inputs/Outputs of an algorithm

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

What does the rectangle represent?

Flowcharts

A

General instructions, processes and calculations

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

What does the diamond represent?

Flowcharts

A

Decisions - Often ‘Yes’ or ‘No’

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

What does the rectangle with two lines represent?

Flowcharts

A

Sub programs

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

Why are Flowcharts Used?

A
  • It can show sequences, selections and iterations.
  • Like pseudocode they break algorithms down into stages which can then be used by a programmer to quickly turn an algorithm into code.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the two types of Searches?

Searching Algorithms is on GoodNotes

A

Linear Search
Binary Search

Searching Algorithms is on GoodNotes

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

What are the Advantages and Disadvantages of Linear Searches?

A

**Advantages: **
You don’t gave to sort a list in order

**Disadvantages: **
It is the least efficient search

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

What are the Advantages and Disadvantages of Binary Searches?

A

**Advantages: **
It is the quickest and most efficient search.

**Disadvantages: **
You have to sort the list before you find the item.

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

What are the three sorting algorithms?

Sorting Algorithms is on GoodNotes

A

Bubble Sort
Merge Sort
Insertion Sort

Sorting Algorithms is on GoodNotes

17
Q

What are the advantages and disadvantages of Bubble sorts?

A

**Advantages: **
* It’s a simple algorithm that can be easily implemented on a computer.
* Doesn’t use much memory as all the sorting is done in the original list.
* It’s efficient to check if a list is already in order.

**Disadvantages: **
* It’s an inefficient way to sort a list.
* Because it’s inefficient it does not cope with a large amount of items

18
Q

What are the advantages and disadvantages of Merge sorts?

A

**Advantages: **
* In general it’s much quicker and more efficient than a bubble sort and insertion sort for large lists.
* It has a very consistent running time regardless of how ordered the items in the original list are.

**Disadvantages: **
* It’s slower than other algorithms for smaller lists.
* Even if the list is already sorted, it still goes through the whole splitting and merging process.
* Uses more memory than the other sorting algorithms in order to create the separate lists.

19
Q

What are the advantages and disadvantages of Insertion sorts?

A

**Advantages: **
* Copes very well with small lists.
* Very quick to add items to an already sorted list
* Very quick at checking if a list is already sorted.

**Disadvantages: **
* Like bubble sorts, doesn’t cope well with large lists.