2.1 Algorithms Flashcards

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

Define Computational Thinking

A

Computational thinking is about the steps taken to find a solution to a complex problem. It involves decomposition, abstruction and algorithmic thinking.

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

Define decomposition

A

Decomposition is breaking down a complex problem into smaller problems and solving each one individually. Each individual problem can be separately tested and solved. Can be recombined to produce full solution.

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

Define abstraction

A

Abstraction involves picking out the important bits of information from the problem and ignoring the specific, unnecessary information that doesn’t matter. Simplifies problem and makes it straightforward to understand.

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

Define algorithmic thinking

A

Algorithmic thinking is a logical way of getting from a problem to a solution. If the steps you take follow an algorithm, this can be used again in the future.

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

Define pseudocode

A

Pseudocode is not an actual programming language. It shows the steps of the algorithm without the need to follow syntax. It can easily be followed by a coder.

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

Define flowcharts

A

Algorithms can be shown using a flowchart. Flowcharts use different shape boxes for different commands.

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

Define search algorithm

A

Computers follow a search algorithm to find items in a list e.g. searching for a shopping website, searching for appointments at a doctor surgery.

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

Define binary search

A

Binary search looks for items in an ordered list. This list can contain letters, numbers or alphanumeric characters.

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

Define linear search

A

A linear search can be used on an unordered list. This type of search checks each item in turn and stops when it finds the item or reaches the end of the list.

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

Define sorting algorithm

A

Computers follow a sorting algorithm to sort items in the list. E.g. sorting a list of names in Excel, shopping website – sorting a list from lowest to highest price.

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

Define bubble sort

A

The bubble sort algorithm compares pairs of items. It is very simple, but can take a long time to sort long lists.

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

Define merge sort

A

Emerge thoughts, let’s the list apart the merge that back together. This is much more efficient than the bubble sort for larger lists, but much slower for shorter lists.

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

Define insertion sort

A

Insertion sort orders the items as it goes. Insertion sort is a very simple algorithm and works very well with small lists. It is not very efficient for larger lists.

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

Define dry run

A

Walking through an algorithm with sample data, running each step manually.

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

Define algorithm

A

The series of steps to solve a problem or perform an action

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

Define flowchart

A

A diagram that shows the inputs, outputs and processes in an algorithm

17
Q

Define process

A

An action that takes place

18
Q

Define pseudocode

A

Simplified, not language specific style used to design algorithms

19
Q

What is algorithm?

A

A set of instructions presented in a logical sequence

20
Q

What do the different flowchart symbols represent?

A

Oval - start/ end
Rectangle - process
Rectangle which is cut - subroutine
Diamond - decision
Parallelogram - input/ output

21
Q

Trace table

A

Track the values of variables as the program is run

22
Q

Sequence

A

Structuring code in a logical, sequential order

23
Q

Selection

A

Decision making using if statements

24
Q

Iteration

A

Repeating code using for or while loops

25
Q

Variable

A

Stores data in programs. The value can change as the program is run. Two parts, data value and identifier.

26
Q

Local variable

A

Declared within a subroutine and can only be used within that subroutine
Saves memory
Easier to debug
Reused

27
Q

Global variables

A

Are used at any point in the whole program
Maintenance easier
Used for constants

28
Q

Constants

A

Doesn’t change in value as the program is run

29
Q

MOD

A

Returns remainder

30
Q

DIV

A

Returns whole number