Algorithms Flashcards

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

What is an algorithm?

A

A sequence of instructions that can be followed to complete a specific task

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

What is abstraction?

A

The process of removing unnecessary details from a problem.

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

What is decomposition?

A

Breaking down a problem into a number of sub-problems so that each sub-problem accomplishes a specific task.

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

What is a flow-chart?

A

A diagram that shows the steps of an algorithm through the use of symbols

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

What is pseudocode?

A

A technique of describing an algorithm in a manner that resembles a programming language.

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

What is a trace table?

A

Trace tables allow the programmer to trace through a computer program using pen and paper, keeping a record of how variable values change over time.

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

What is debugging?

A

The process of finding and fixing errors in a computer program.

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

What is input?

A

An input can be generated by a user or a sensor. Computer programs may preform different actions dependant upon different input values.

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

What is a process?

A

An action taken by a computer program.

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

What is an output?

A

The result of a process in a computer program which may result in a sound, visual or mechanical response.

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

What is a linear search?

A

The linear search works by looking at each value of the list in turn until it finds the item its looking for. This linear search is slow but its easy to program and can work with an unordered list.

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

What is a binary search?

A

Each iteration the binary search compares the middle value in the list against the value which is being attempted to be found. Half the list is discarded each iteration making the search very fast. The binary search works with ordered lists only.

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

What is a bubble sort?

A

The bubble sort takes lists of unordered values and putting them into the correct order by comparing two neighbouring numbers. Each run through the bubble sort is called a pass. The bubble sort is complete when a pass finished without any swaps being made.

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

What is a merge sort?

A

The merge sort algorithm repeatedly divides a list into two until all elements are separated individually. Pairs of lists are then compared, placed into order and combined. The process is then repeated until the list is recomplied as a whole. The merge sort is more complex to program than the bubble sort but much faster.

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

Linear search vs binary search

A

The linear and binary searching produce the same results but the linear search is best used when the data is not in order or with smaller lists. The binary search is much more efficient when there is an ordered list of values to search.

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

Bubble sort vs merge sort

A

The bubble sort is a simple algorithm to understand however it preforms very poorly with large lists. A merge sort is very fast with large lists however it is more complicated to program