2.2) Algorithms Flashcards

1
Q

What is an algorithm?

A

Process used to solve problem or achieve task.

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

What is an algorithm judged by?

A

Whether completes task or solves problem in most efficient way.
Efficient algorithm only uses resources necessary to complete task no > no

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

What is an algorithm generally made up of?

A

Input-process-output.

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

What is an algorithm tracked using and what do they do?

A

Trace tables.

Trace progress of computer through code.

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

What is efficiency?

A

Extent to which task completed in shortest possible amount of code. Also relates to amount of memory used + speed of execution of code.

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

What are trace tables?

A

Template helps follow each instruction in program.

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

What is a flowchart?

A

Visual way to plan program through sequence of events.

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

What is decomposition?

A

Breaks a task into smaller tasks.

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

What does decomposition do?

A

Helps write code as easier to write code each section at time, alternative to writing whole in 1 go.
Makes life easier when testing code as can test section before running all together.

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

What is abstraction?

A

Way remove unneeded info from task so computer can complete it.

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

What is searching?

A

Basic + common task for algorithm.

2 types= binary + linear.

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

What does binary search do?

A

Chooses middle value in sorted array.
Works out whether value sought higher or lower than middle value.
Splits array again to check again.
List repeatedly split in half and half until item located.

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

Is the binary search method used in real life?

A

Yes.

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

What is an array?

A

Set of data items of same type grouped together using 1 identifying label or identifier.

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