2.1 Algorithms Flashcards

1
Q

How can algorithms be written -

A

As flowcharts, pseudocode or python

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

Algorithms

A

a step-by-step set of instructions to solve a problem.

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

What is pseudocode?

A

Code written in English. The idea is that programmers can plan an algorithm before they actually start programming it.

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

Flowcharts -

A

Another way to design algorithms that all programmers will be able to understand and implement in their own programming language.

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

Linear search

A

Just looks through each item in the list until it finds it.

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

Binary search

A

Finds the middle value of the list. Breaks the list in two, sees if it is above or below the middle. If it is above, it will then discard the bottom half of the list. It will then break the top half in two. Again, it checks if it is above or below, if it is below, it will discard the top half and so on until it finds the item.

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

Bubble sort

A

Swaps values in to order with each iteration until they are in order.

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

Merge sort -

A

Breaks the lists into smaller lists and rearranges and merges them into the correct order.

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

Insertion sort -

A

Takes the list values out and inserts them into the correct order.

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

Abstraction -

A

Removing unnecessary details. Focusing only on the details you want.

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

Decomposition -

A

Breaking a problem down into smaller solvable sub-problems.

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

Algorithmic Thinking -

A

Creating step-by-step instructions to solve a problem using computers.

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

Syntax Errors -

A

Will cause an error. Your code will not run.

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

Logic Errors -

A

Will not cause an error. Your code will run, but not as intended.

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

Structure Diagrams -

A

Can be used to show how a program can be DECOMPOSED into separate SUB- ROUTINES.

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