Algorithms and Programming Flashcards
Algorithms
unambiguous series of instructions needed to create a task that is language neutral and not in code
Annotation
add comments to explain function of each section of the 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
Basic Operation
the operation which contributes most to the total running time
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
Block Code
putting code into blocks where each block deals with one task
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