Another simple calculation is that of finding the largest element in a list.
This is an obvious operation... in fact, the total
number of comparisons is just n-1.
int max( vector<int> & data ) { int max = data[0]; for( int i = 1; i < data.size(); i++ ) if( data[i] > max ) max = data[i]; return max; }