Algorithms and Programs Flashcards
Algorithm
A step-by-step procedure for solving a problem
Pseudocode
Code that resembles a programming language but uses less strict syntax to express an algorithm and is INDEPENDENT of any real programming language.
Identifier
Is a user-defined name e.g. a variable or sub routine name
Parameter
A parameter or “argument” is a value that is passed into a function or procedure
Bubble sort
A pass is made through the data comparing each value with the following one and swapping if necessary. A number of passes are made until the data is in order
Insertion Sort
Removes one element from the input data, finds the location it belongs within the sorted list, and inserts it there. It repeats until no input elements remain
Linear search
Each element in the search space is examined in order starting at the first element. When a match is found with the search term (or no match is found) the operation is complete
Binary search
Repeatedly divides an ordered search space in half according to how the required (key) value compares with the middle element.
Rogue value
A value that can be recognized as a termination value in a loop
Source code
The code listing of commands to be compiled or assembled into an executable program.
Assignment
statement
It copies a value (or result of a calculation) into the variable
Iteration
Other word for LOOP
Repeatedly execute a block of code until a condition has been met
Selection
Other word for IF statement or CASE statement
Execute a block of code only when a certain condition has been met.
Sequence
Instructions that will executed one after another
MOD operator
Finds the remainder after division of one number by another