O(n) notation.
When writing programs, it's often useful to judge your algorithms by how many operations they will take to act on any given input. Big O notation (written as O ( n ) and also called "Big O") can be used to convey how many operations your algorithm might take, or how much memory it might occupy. Normally, you use 'worse case' to determine this, since many algorithms number of operations and memory occupied will vary based on the input. O ( 1 ) - Constant Time and Space Consider this algorithm: int getFirstElement ( int [] a) { return a[ 0 ]; } No matter what size array you pass into this function, it will just return the first element, which means it always takes the exact same amount of time to run, which makes it O ( 1 ) time . It also makes no additional variables or requires any extra storage to operate which makes it O ( 1 ) space . O ( n ) - Linear Time Now consider this algorithm: int findMax ( int [] a, int length) { int max = 0 ; for...