about max and min in an array
I hate myself very much! I promised that I would reply the posted related to ... However, I cannot help myself after I read the posts under.
For max and min in an array, no comparison needed. Assuming we have two numbers A and B, the min = (A+B)/2-ABS((A-B)/2) and max=(A+B)/2+ABS((A-B)/2). Recursively travel through the array and you would find the min and max.
It is a simple algorithm.