Algorithms and Programming Flashcards

You may prefer our related Brainscape-certified 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

Arbitrage Opportunity

A

converting between currencies to generate profit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
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
4
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
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

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
7
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
8
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
9
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
10
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
11
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
12
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
13
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
14
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
15
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
16
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
17
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
18
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
19
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
20
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
21
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
22
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
23
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
24
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
25
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
26
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
27
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
28
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
29
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
30
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
31
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
32
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
33
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
34
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
35
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
36
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
37
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
38
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
39
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
40
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
41
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
42
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
43
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
44
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
45
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
46
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
47
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
48
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
49
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
50
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
51
Q

Error

A

problems in the program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
52
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
53
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
54
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
55
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
56
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
57
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
58
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
59
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
60
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
61
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
62
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
63
Q

Complexity

A

how big an executable file is

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

Compression Ratio

A

how much space it saves

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
65
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
66
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
67
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
68
Q

Speed

A

how fast it is

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
69
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
70
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
71
Q

Graph

A

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

72
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

73
Q

Hyperlocal Variable

A

a variable used in extreme isolation

74
Q

Identifier

A

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

75
Q

Illegal Operation

A

an operation that cannot be run by the system

76
Q

IDE

A

Integrated Development Environment

an integrated set of tools used in software development

77
Q

Imperative Program

A

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

78
Q

In Order Traversal

A

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

79
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

80
Q

ADD

A

add one number to another

81
Q

AND

A

Boolean algebra function

82
Q

DEC

A

decrement a number by 1

83
Q

INC

A

increment a number by 1

84
Q

JMP

A

jump to another section of code

85
Q

JNZ

A

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

86
Q

JZ

A

jump to another section of code if the number is 0

87
Q

MUL

A

multiply two numbers together

88
Q

NOT

A

Boolean algebra function

89
Q

OR

A

Boolean algebra function

90
Q

SUB

A

subtract one number from another

91
Q

XOR

A

Boolean algebra function

92
Q

Iteration

A

where code statements are repeated

93
Q

Leaf

A

a terminal node with no children

94
Q

Left Pointer

A

position of the item to the left of the current node

95
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

96
Q

Linear Growth Rate

A

the growth rate of a factorial recursive function

97
Q

Linker

A

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

98
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

99
Q

Logarithmic Growth Rate

A

the growth rate of quicksort algorithm

100
Q

Lossless Compression

A

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

101
Q

Lossy Compression

A

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

102
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

103
Q

Manual Techniques

A

tools to detect errors

104
Q

Dry Running

A

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

105
Q

Rubber Duck Debugging

A

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

106
Q

Trace Table

A

used to track how variables change when a program is run

107
Q

Tracing

A

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

108
Q

Variable Dumping

A

write variable values to screen as the program runs

109
Q

Memory Inspector

A

allows contents of computer memory to be examined

110
Q

Memory Management

A

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

111
Q

Memory Protection

A

a way to control memory access rights to a computer

112
Q

Negative Compression

A

where compression causes a file to grow in size

113
Q

Nesting

A

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

114
Q

Number

A

represents an amount of stuff

115
Q

Number System

A

the way in which numbers are represented by digits

116
Q

Object-Oriented Program

A

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

117
Q

Paradigm

A

a distinct set of concepts or thought patterns

118
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

119
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

120
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

121
Q

Parent

A

nodes in a tree can only have one of these

122
Q

Partition

A

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

123
Q

Passing by Reference

A

allows a function to modify a variable without creating a copy

124
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

125
Q

Point of Invocation

A

the place where the function was called from

126
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

127
Q

Post Order Traversal

A

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

128
Q

Pre Order Traversal

A

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

129
Q

Processing

A

all code other than input or output

130
Q

Program

A

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

131
Q

Program Logic

A

the thinking, planning and implementing behind coding

132
Q

Pseudorandom

A

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

133
Q

Publisher

A

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

134
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

135
Q

Recursion

A

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

136
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

137
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

138
Q

Recursive Step

A

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

139
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

140
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

141
Q

Reverse Polish Notation

A

the order in which computers execute operations, effectively computer BODMAS

142
Q

Right Pointer

A

position of the item to the right of the current node

143
Q

Root

A

the top node in a tree

144
Q

Searching Algorithm

A

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

145
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.

146
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

147
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

148
Q

Second Search

A

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

149
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

150
Q

Selection

A

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

151
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.

152
Q

Sequence

A

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

153
Q

Sequence Block

A

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

154
Q

Sequential Operations

A

instructions that are executed in order

155
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

156
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

157
Q

Try/Catch Block

A

contains a set of statements for when an error occurs

158
Q

Unwinding

A

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

159
Q

Validation

A

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

160
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

161
Q

Data Type Check

A

checks that data is the correct type

162
Q

Existence Check

A

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

163
Q

Format Check

A

checks that data meets formatting rules

164
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

165
Q

Length Check

A

checks that data meets rules regarding a minimum or maximum length

166
Q

Presence Check

A

checks that data was entered into a field

167
Q

Range Check

A

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

168
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

169
Q

Global Variable

A

a variable available to all areas of the program

170
Q

Local Variable

A

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

171
Q

Variable Assignment

A

setting a value to a variable

172
Q

Variable Declaration

A

when variables are declared, indicating variable name and data type

173
Q

Verification

A

ensuring that data is correct

174
Q

Double Entry

A

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

175
Q

Proof Reading

A

the data is entered and manually checked

176
Q

Weight

A

a value associated with the edge in a graph