Algorithms and Programming Flashcards

1
Q

Algorithms

A

unambiguous series of instructions needed to create a task that is language neutral and not in code

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

Annotation

A

add comments to explain function of each section of the code

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

Arbitrage Opportunity

A

converting between currencies to generate profit

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

Arithmetic Efficiency

A

used to describe the efficiency of an algorithm based on standard mathematical functions, with O standing for Order

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

Auto-Completion of Statements

A

gives suggestions in a drop-down menu when the user is typing, saving time and minimising bugs

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

Auto-Completion of Statements

A

gives suggestions in a drop-down menu when the user is typing, saving time and minimising bugs

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

Automatic Formatting

A

may also include automatically indenting code, saves time and reduces chance of bugs

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

BNF

A

Backus-Naur Form

used by the developers of programming languages to specify the syntax rules of a language

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

Base Condition

A

a requirement in recursive functions, without which the function will continue to execute in an infinite loop

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

Basic Operation

A

the operation which contributes most to the total running time

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

Big O Notation

A

tells you the number of operations an algorithm will make

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

Constant Time

A

O(1)

this takes the same amount of time to complete regardless of the amount of input data

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

Exponential Time

A

O(2^n)

where the time taken to complete will double with every extra data item, such as a recursive Fibonacci algorithm

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

Factorial Time

A

O(n!)

where the time taken to complete will grow much faster than the exponential time, for example, in password cracking programs

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

Linear Time

A

O(n)

where the time taken to complete the algorithm grows in direct proportion to the number of data items, for example, a linear search in an array

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

O Growth Time

A

O(n log^2 n)

where the time complexity depends on n, such as in a recursive quicksort algorithm

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

Polynomial Time

A

O(n^2)

where the time taken to complete the algorithm is directly proportionate to the square of the number of data items, for example, in an algorithm using two nested loops, such as a typical sort routine

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

Block Code

A

putting code into blocks where each block deals with one task

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

Blue Screen of Death

A

signifies a fatal error with the operating system

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

Bracket Matching

A

automatically adds a bracket after an opening bracket has been added, saves time and reduces chance of bugs

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

Branches

A

links nodes together in a tree structure

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

Breakpoint

A

causes program to run up to a point and then pause, allowing for variable inspection

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

Bubble Sort

A

involves iterating through the list, beginning by comparing the first and second items and swapping them if they are out of order and continuing to compare until the end of the list after which the process will be repeated until no more swaps are made

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

Colour Coding Key Words

A

an automatic function in the IDE, helps with preventing bugs

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

Compression Algorithm

A

process that reduces a file’s size for efficient storage or transmission

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

Dictionary Compression

A

a lossless compression technique that relies on finding patterns in data and substituting them for a shorter code. Codes and their meanings are stored in a dictionary or code list

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

Dynamic Allocation

A

memory space is only allocated when required at runtime

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

Huffman Coding

A

a form of lossless compression which makes files smaller using the frequency with which characters appear in a message

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

Lossless Compression

A

a way of compressing data without removing parts, such as ZIP files

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

Lossy Compression

A

a way of compressing data by removing parts, permanently changing it, using this equation: compression ration = original file size / compressed file size

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

RLE Compression

A

Run-Length Encoding Compression

a form of lossless compression that looks at the data in a file for consecutive runs of the same data, storing data as one item of data, instead of many

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

Condition

A

a Boolean test which can either be true or false

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

Condition Controlled Loop

A

where code statements are repeated whilst a condition is met

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

Constant

A

hold a fixed value, stored in memory, have an identifier, data type and value and cannot change during execution of the program

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

Constant Declaration

A

involves specifying the identifier, data type and value

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

Constant Growth Rate

A

most iterative algorithms will have a constant growth rate of O(1), for example, in an iterative sorting algorithm

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

Context Sensitive Help

A

provides help based on a specific dialogue box or control in a program, enabling users to get specific information about the part of the program they are using at any given moment

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

Control Flow

A

the order in which statements, instructions or function calls of an imperative program are executed or evaluative

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

Control Operations

A

where instructions don’t have to be carried out in order

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

Conditional Operations

A

a control structure that checks if a condition is true or false then executes an instruction based on the answer

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

Iterative Operations

A

a control structure that repeats a set of instructions until a condition is met using loops

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

Count Controlled Loop

A

where code statements are repeated a specific amount of times

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

Current Pointer

A

position in the array of the current node

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

Data Type

A

indicates size of variable and enforces some rules about the nature of the variable

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

Debugging Tools

A

a software tool in the IDE that helps the user identify errors in the code

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

Breakpoint

A

causes program to run up to a point then pause, allowing for variable inspection

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

Step Thru’

A

steps through program one statement at a time, allowing faults in program logic to be identified

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

Variable Inspection

A

allows variables stored in a program to be watched as the program runs

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

Variable Watch

A

the act of observing a specific variable whilst the program runs, which the programmer can do whilst using variable inspection

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

Declarative Program

A

used in programs such as Chat GPT, involves telling the computer what needs to be done instead of how to do it

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

Defensive Programming

A

a form of defensive design intended to develop programs that are capable of detecting potential security abnormalities and make predetermined responses

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

Digit

A

a symbol that can be used with other digits to represent a number

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

Dijkstra’s Algorithm

A

involves assigning every node a temporary value, setting it to zero for the initial node and to infinity for all other nodes, adding all nodes to a priority queue sorted by current distance and whilst the queue is not empty, removing the current node from the front of the queue; for each unvisited neighbour of the current node, add up the distances and find the shortest one

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

Emulator

A

simulates a physical device, such as a mobile phone or games console, to allow apps to be tested on the computer rather than that device

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

Error

A

problems in the program

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

Linking Error

A

an error that occurs when the program calls a library that has not been linked to the program

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

Logical Error

A

when the code runs, but does not do what you want it to do

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

Rounding Error

A

when a number is rounded when it shouldn’t be, for example 4.5 is rounded to 5, causing a rounding error of +0.5

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

Runtime/Execution Error

A

an error that occurs when a program requests more memory than is available

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

Semantic Error

A

error in the meaning of the code

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

Syntax Error

A

an error that occurs when a program does not follow the expected syntax of the code

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

Truncation Error

A

when a number is truncated when it shouldn’t be, for example, 3.7 is truncated to 3, creating a truncation error of 0.7

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

Error Trapping

A

refers to the prediction, finding and fixing of programming errors

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

Exception Handler

A

the process of responding to anomalous or exceptional conditions requiring special processing

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

Explorer’s Problem

A

a problem in which the solution finds a route that traverses each road exactly once before returning to the starting point

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

Exponential Function

A

a function with the form f(x)=ax where a is a constant value. The result of the function becomes very big very quickly

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

Factorial Functions

A

an operation that describes taking any whole number and multiplying it by every lesser value until you get to one, denoted by an exclamation mark which grows very quickly

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

Complexity

A

how big an executable file is

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

Compression Ratio

A

how much space it saves

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

Latency

A

how long you have to wait until it starts streaming

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

Portability

A

whether files are readable by any standard compression utility

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

Space

A

how much RAM the algorithm needs to run

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

Speed

A

how fast it is

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

Flag

A

a specific symbol such as a dollar sign that designates RLE

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

Free Pointer

A

points to the next free space in the list

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

Function

A

self contained modules of code that accomplish a specific task, and can be recalled several times in the program

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

Graph

A

a non-linear data structure that comprises a set of connected nodes

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

Head Pointer

A

points to beginning of list

79
Q

Heuristic

A

an approach that uses experience to make informed guesses that assist in finding a polynomial time solution to an intractable algorithmic problem; the solution may be non-optimal

80
Q

Huffman Trees

A

a compression technique used to reduce the number of bits needed to send or store a message that is based on the frequency of occurrence of a data item. The principle is to use a lower number of bits to encode data that appears more frequently. Characters are arranged into a binary tree and each character is assigned a code by traversing the tree. More frequently used characters have shorter codes allowing for data compression

81
Q

Hyperlocal Variable

A

a variable used in extreme isolation

82
Q

Identifier

A

allows program to retrieve the value stored in the variable for memory

83
Q

Illegal Operation

A

an operation that cannot be run by the system

84
Q

IDE

A

Integrated Development Environment

an integrated set of tools used in software development

85
Q

Imperative Program

A

involves giving the computer a clear set of instructions, which it then follows exactly

86
Q

Indentation

A

shows the structure of the program

87
Q

Instruction Set

A

the complete set of all the instructions in machine code that can be recognized and executed by a central processing unit

88
Q

ADD

A

add one number to another

89
Q

AND

A

Boolean algebra function

90
Q

DEC

A

decrement a number by 1

91
Q

INC

A

increment a number by 1

92
Q

JMP

A

jump to another section of code

93
Q

JNZ

A

jump to another section of code if the number is not 0

94
Q

JZ

A

jump to another section of code if the number is 0

95
Q

MUL

A

multiply two numbers together

96
Q

NOT

A

Boolean algebra function

97
Q

OR

A

Boolean algebra function

98
Q

SUB

A

subtract one number from another

99
Q

XOR

A

Boolean algebra function

100
Q

Iteration

A

where code statements are repeated

101
Q

Leaf

A

a terminal node with no children

102
Q

Left Pointer

A

position of the item to the left of the current node

103
Q

Linear Function

A

a function that as the form f(x)=ax+c where a and c are constant variables. In this function, c becomes insignificant as x increases

104
Q

Linear Growth Rate

A

the growth rate of a factorial recursive function

105
Q

Linker

A

combines pre-compiled modules of code, such as standard libraries, into a single executable file

106
Q

Logarithmic Function

A

a function that has the form f(x)=a logn x where a and n are constant values, the result of a function growing very slowly

107
Q

Logarithmic Growth Rate

A

the growth rate of quicksort algorithm

108
Q

Lossless Compression

A

used to compress files using run length encoding so does not involve removing data as it looks for repeating

109
Q

Lossy Compression

A

used to store images (JPEG), sound (MP3) and videos (MP4) which involves removing part of the data

110
Q

LZ Compression

A

a table-based compression model where table entries are substituted for repeated strings of data. This table is normally generated dynamically from earlier data in the input. The table itself is often Huffman encoded

111
Q

Manual Techniques

A

tools to detect errors

112
Q

Dry Running

A

where a programmer manually goes through the code line by line to find the error

113
Q

Rubber Duck Debugging

A

where a programmer explains to a rubber duck what the code will do

114
Q

Trace Table

A

used to track how variables change when a program is run

115
Q

Tracing

A

where a programmer manually goes through the code line by line to find the error

116
Q

Variable Dumping

A

write variable values to screen as the program runs

117
Q

Memory Inspector

A

allows contents of computer memory to be examined

118
Q

Memory Management

A

the process of controlling and coordinating a computer’s main memory

119
Q

Memory Protection

A

a way to control memory access rights to a computer

120
Q

Modularisation

A

use of functions and subroutines to break up programs into a series of subprograms

121
Q

Negative Compression

A

where compression causes a file to grow in size

122
Q

Nesting

A

where one statement is placed within another to build up the complexity of the code

123
Q

Null Pointer

A

points to the end of the list

124
Q

Number

A

represents an amount of stuff

125
Q

Number System

A

the way in which numbers are represented by digits

126
Q

Object-Oriented Program

A

programming based on the concept of objects, which can contain data and code

127
Q

Paradigm

A

a distinct set of concepts or thought patterns

128
Q

Parameter

A

treated as a local variable within a subroutine so the value can be changed but removes the need to rely on the global variables to pass values between routines, helping reduce the chance of bugs in your code

129
Q

Parameters by Reference

A

where the address of the value is supplied to the sub-routine so if the subroutine changes the value of the parameter, the original value is updated

130
Q

Parameters by Value

A

a copy of the data item is sent to the sub-routine so changes in the value of the parameter will not alter the original value

131
Q

Parent

A

nodes in a tree can only have one of these

132
Q

Partition

A

an unsorted section of the list, is repeatedly partitioned until every partition contains only one number and the list is sorted

133
Q

Passing by Reference

A

allows a function to modify a variable without creating a copy

134
Q

Passing by Value

A

a copy of the passed-in variable is copied into the argument of the method. Any changes to the argument do not affect the original one

135
Q

Point of Invocation

A

the place where the function was called from

136
Q

Polynomial Function

A

a function with the form f(x)=axn+bx+c where a, n, b and c are constant values, and in this function, x2 becomes the only significant function as x increases

137
Q

Processing

A

all code other than input or output

138
Q

Program

A

implementation of algorithm, a list of instructions that a computer has to work through in order to complete a specific task

139
Q

Program Logic

A

the thinking, planning and implementing behind coding

140
Q

Pseudorandom

A

randomness satisfying one or more statistical tests for randomness but produced by a definite mathematical procedure

141
Q

Publisher

A

packages the programs and its sub-modules into a single easy to install package for program development

142
Q

Quick Sort

A

a divide-and-conquer algorithm that recursively breaks the list up into multiple lists. An item is selected at random to be the pivot, creating two new lists. Items less than the pivot move to one list and itmes more than the pivot move to the other. This is repeated with each sub list until the lsits only have one item, after which they are merged back together

143
Q

Recursion

A

a function that calls itself and stops calling itself when a base condition is met

144
Q

Recursive Algorithm

A

these require space for each call of the function as all data items for each call are added to the stack as the memory growth or space complexity is dependent on the number of cells

145
Q

Recursive Fibonacci Algorithm

A

the recursive equation for Fibonacci is T(n)=T(n-1)+T(n-2)+O(1). This means the time taken to calculate fib(n) is equal to the sum

146
Q

Recursive Step

A

a step that will be followed until the base condition is met in recursion

147
Q

Recursive Tree

A

where every tree has only one root and each node is the root of a sub-tree. Thus, a tree consists of a root and one or more sub-trees, each of which is a tree

148
Q

Regular Expression

A

an approach that uses experience to make informed guesses that assist in finding a polynomial time solution to an intractable algorithmic problem; the solution may be non-optimal

149
Q

Regular Language

A

any language that a finite state machine (FSM) will accept

150
Q

Return Value

A

when exiting, functions always return a value to the point of invocation either by using the keyword Return or by setting the name of the function to a value

151
Q

Reverse Polish Notation

A

the order in which computers execute operations, effectively computer BODMAS

152
Q

Right Pointer

A

position of the item to the right of the current node

153
Q

Root

A

the top node in a tree

154
Q

Rooted Tree

A

a tree structure with a clear root node

155
Q

Searching Algorithm

A

a computer uses searching algorithms to search for a value in a given list

156
Q

Binary Search

A

a more efficient way of soring that only works on sorted lists which starts by finding the middle item and comparing it to the value it is searching for; if the middle value is smaller than the value it is searching for then the first half of the list is removed, including the middle value. If the new middle value is larger than the value it is searching for then the top half of the list is removed, including the middle value. This process is repeated until the value is found.

157
Q

Insertion Search

A

when exiting, functions always return a value to the point of invocation either by using the keyword Return or by setting the name of the function to a value

158
Q

Linear Search

A

goes through each item in an algorithm one by one until it finds the one it is looking for, then it stops the search after potentially going through every item in the list

159
Q

Second Search

A

checks every second record, then goes back if it has gone past what it is searching for

160
Q

Quick Search

A

uses a divide and conquer approach, begins by breaking the list into two sections based off of a pivot value, one of which will eventually contain all the numbers before the pivot value and one of which will eventually contain all the numbers after the pivot value

161
Q

Rooted Tree

A

a tree structure with a clear root node

162
Q

Selection

A

where code statements are carried out based on the results of a condition

163
Q

Selection Sort

A

where the algorithm repeatedly selects the smallest element from the unsorted portion of the list and swaps it with the first element of the unsorted part. The process is repeated for the remaining unsorted portion until the entire list is sorted.

164
Q

Sequence

A

a block of statements where every statement is carried out in written order, and each statement is carried out once

165
Q

Sequence Block

A

a block of statements where every statement is carried out in written order, and each statement is carried out once

166
Q

Sequential Operations

A

instructions that are executed in order

167
Q

Space Complexity

A

describes growth of storage space required with data volumes and the growth rate of memory usage is the amount of additional memory required by each additional run through the program

168
Q

Tree

A

dynamic data structure consists of nodes linked by branches and the top node is the root node. Nodes can have up to two child nodes and only one parent node. Trees can be implemented using a two-dimensional array to store the nodes. Each node stores a left pointer, a data item and a right pointer

169
Q

Breadth-First Traversal Algorithm

A

consists of accessing each node, one level after the other. On each layer the nodes are accessed as they appear, from left to right

170
Q

Depth-First Traversal Algorithm

A

traversal algorithms which are based on a recursive approach

171
Q

In Order Traversal

A

start by traversing the left-hand subtree, visiting the root node first, then the right-hand sub-tree

172
Q

Post Order Traversal

A

traverse the left-hand sub-tree, then traverse the right-hand sub-tree then return to the root node

173
Q

Pre Order Traversal

A

start at the root node, then traverse the left-hand sub-tree followed by the right-hand sub-tree

174
Q

Try/Catch Block

A

contains a set of statements for when an error occurs

175
Q

Unrooted Tree

A

a tree without a clear root node

176
Q

Unwinding

A

when a base condition is met and all function calls start to return

177
Q

Validation

A

ensuring that the data meets certain rules. It does not ensure that data is correct

178
Q

Batch Total

A

the sum of a particular field in a collection of items used as a control total to ensure that all data has been entered into the computer

179
Q

Data Type Check

A

checks that data is the correct type

180
Q

Existence Check

A

checks that the value exists in a table/file in the system

181
Q

Format Check

A

checks that data meets formatting rules

182
Q

Hash Total

A

number produced by adding together corresponding fields over all the records of a file, but the total has no external meaning and is used solely to verify the records in the file

183
Q

Length Check

A

checks that data meets rules regarding a minimum or maximum length

184
Q

Presence Check

A

checks that data was entered into a field

185
Q

Range Check

A

checks the data item lies within an allowed range between a specified minimum and a maximum value

186
Q

Variable

A

a computer memory location that is referred to by an identifier and holds a values that can change when the program is run

187
Q

Global Variable

A

a variable available to all areas of the program

188
Q

Local Variable

A

a variable only available to part of the program, such as in one subroutine

189
Q

Variable Assignment

A

setting a value to a variable

190
Q

Variable Declaration

A

when variables are declared, indicating variable name and data type

191
Q

Verification

A

ensuring that data is correct

192
Q

Double Entry

A

the data item is entered twice and the two copies are compared

193
Q

Proof Reading

A

the data is entered and manually checked

194
Q

Weight

A

a value associated with the edge in a graph