a named group of programming instructions that may have parameters and return values
procedure (aka function)
Where does a binary search begin in a list?
In the middle
a decision problem for which an algorithm can be written to produce a correct output for all inputs
decidable problem
The first element in a list (in pseudocode not javascript)
index 1
this command is used in a program when a different value is produced during each execution
random value
input variables of a procedure.
parameter
sorted
Algorithms with a polynomial efficiency or slower (constant, linear, square, cube etc) are said to run in....
a reasonable amount of time
What happens to the items in a list when the code below is run?
INSERT (myList, 4, "cucumbers");
Inserts cucumber at index 4 of myList AND shifts values in the list that are greater than or equal to 4 to the right
this command is used to assign a value to the procedure when it is called
return
specify the values of the parameter when the procedure is called
argument
What is the maximum number of iterations required for a list that consists of 100 values?
7
a decision problem for which no algorithm can be constructed that is always capable of of providing a correct answer.
undecidable problem
What does the code segment below do?
myList.length
finds the length of the list myList
a general description of a task that can or cannot be solved algorithmically
problem
an estimation of the amount of computational resources used by an algorithm (expressed as a function of the size of the input)
efficiency
What is it called when you do a linear search through a list?
traversal
Algorithms with exponential or factorial efficiencies run in ....
an unreasonable amount of time
What syntax word is used to add an element to a list?
Linear or Binary: Which is more efficient when searching a sorted list
Binary
the subdivision of a computer program into separate subprograms
What type of loop is used to complete a linear search of a list?
for loop
an approach to a problem that produces a solution that is "good enough" when the optimal solution is impractical
heuristic
Given the list below, what command must be added to remove the value of 10 from the list? (remember pseudocode!!)
var myList = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20];
REMOVE(myList, 5);
A real world representation that uses varying sets of values to reflect the changing state of a phenomenon.
simulation