Algorithms and Programming Flashcards
Algorithms
unambiguous series of instructions needed to create a task that is language neutral and not in code
Arbitrage Opportunity
converting between currencies to generate profit
Arithmetic Efficiency
used to describe the efficiency of an algorithm based on standard mathematical functions, with O standing for Order
Auto-Completion of Statements
gives suggestions in a drop-down menu when the user is typing, saving time and minimising bugs
Auto-Completion of Statements
gives suggestions in a drop-down menu when the user is typing, saving time and minimising bugs
Automatic Formatting
may also include automatically indenting code, saves time and reduces chance of bugs
BNF
Backus-Naur Form
used by the developers of programming languages to specify the syntax rules of a language
Base Condition
a requirement in recursive functions, without which the function will continue to execute in an infinite loop
Big O Notation
tells you the number of operations an algorithm will make
Constant Time
O(1)
this takes the same amount of time to complete regardless of the amount of input data
Exponential Time
O(2^n)
where the time taken to complete will double with every extra data item, such as a recursive Fibonacci algorithm
Factorial Time
O(n!)
where the time taken to complete will grow much faster than the exponential time, for example, in password cracking programs
Linear Time
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
O Growth Time
O(n log^2 n)
where the time complexity depends on n, such as in a recursive quicksort algorithm
Polynomial Time
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
Blue Screen of Death
signifies a fatal error with the operating system
Bracket Matching
automatically adds a bracket after an opening bracket has been added, saves time and reduces chance of bugs
Branches
links nodes together in a tree structure
Breakpoint
causes program to run up to a point and then pause, allowing for variable inspection
Bubble Sort
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
Colour Coding Key Words
an automatic function in the IDE, helps with preventing bugs
Compression Algorithm
process that reduces a file’s size for efficient storage or transmission
Dictionary Compression
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
Huffman Coding
a form of lossless compression which makes files smaller using the frequency with which characters appear in a message
Lossless Compression
a way of compressing data without removing parts, such as ZIP files
Lossy Compression
a way of compressing data by removing parts, permanently changing it, using this equation: compression ration = original file size / compressed file size
RLE Compression
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
Condition
a Boolean test which can either be true or false
Condition Controlled Loop
where code statements are repeated whilst a condition is met
Constant
hold a fixed value, stored in memory, have an identifier, data type and value and cannot change during execution of the program
Constant Declaration
involves specifying the identifier, data type and value
Constant Growth Rate
most iterative algorithms will have a constant growth rate of O(1), for example, in an iterative sorting algorithm
Context Sensitive Help
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
Control Flow
the order in which statements, instructions or function calls of an imperative program are executed or evaluative
Control Operations
where instructions don’t have to be carried out in order
Conditional Operations
a control structure that checks if a condition is true or false then executes an instruction based on the answer
Iterative Operations
a control structure that repeats a set of instructions until a condition is met using loops
Count Controlled Loop
where code statements are repeated a specific amount of times
Current Pointer
position in the array of the current node
Data Type
indicates size of variable and enforces some rules about the nature of the variable
Debugging Tools
a software tool in the IDE that helps the user identify errors in the code
Breakpoint
causes program to run up to a point then pause, allowing for variable inspection
Step Thru’
steps through program one statement at a time, allowing faults in program logic to be identified
Variable Inspection
allows variables stored in a program to be watched as the program runs
Variable Watch
the act of observing a specific variable whilst the program runs, which the programmer can do whilst using variable inspection
Declarative Program
used in programs such as Chat GPT, involves telling the computer what needs to be done instead of how to do it
Defensive Programming
a form of defensive design intended to develop programs that are capable of detecting potential security abnormalities and make predetermined responses
Digit
a symbol that can be used with other digits to represent a number
Dijkstra’s Algorithm
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
Emulator
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
Error
problems in the program
Linking Error
an error that occurs when the program calls a library that has not been linked to the program
Logical Error
when the code runs, but does not do what you want it to do
Rounding Error
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
Runtime/Execution Error
an error that occurs when a program requests more memory than is available
Semantic Error
error in the meaning of the code
Syntax Error
an error that occurs when a program does not follow the expected syntax of the code
Truncation Error
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
Error Trapping
refers to the prediction, finding and fixing of programming errors
Exception Handler
the process of responding to anomalous or exceptional conditions requiring special processing
Exponential Function
a function with the form f(x)=ax where a is a constant value. The result of the function becomes very big very quickly
Factorial Functions
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
Complexity
how big an executable file is
Compression Ratio
how much space it saves
Latency
how long you have to wait until it starts streaming
Portability
whether files are readable by any standard compression utility
Space
how much RAM the algorithm needs to run
Speed
how fast it is
Flag
a specific symbol such as a dollar sign that designates RLE
Function
self contained modules of code that accomplish a specific task, and can be recalled several times in the program