o(n)
the time is takes is directly proportional to the size of the data
o(1)
always takes the same time and the same number of steps (memory) regardless of the amount of data input
o(n^2)
as the number of items steadily increases, the time taken increases more rapidly therefore, the curve gets steeper
o(2^n)
time doubles for each addition to the data set - time is increasing exponentially
o(log2n)
as the number of items steadily increases, the time taken increases by smaller and smaller amounts
o(nlog2n)
divide and conquer
the graph is like a massive quadratic with less of a curve
explain the purpose of procedures (sub-routines)
the difference between local and global variables
what is meant by passing by reference and why is it used
what is meant by passing by value and why is it used
why is self documenting identifiers important and give an example
why is program layout important and give an example
why is annotation is important and give an example
why is it good programming practice to use constants, meaningful names for variables and annotation in computer programs
-it is clear what the variable is holding and aids program readability (meaningful names)
-other programmers will find the code easier to follow (annotation)
benefit of passing by value
benefit of passing by reference
what is the purpose of validation and give an example
example:
range checks on dates
2 situations where a linear search will generally perform faster than a binary search
1 situation where a binary search will generally perform faster than a linear search