You have 4 variables (A, B, C, D). And you have to sort them for largest to smallest. What is the best way to do this, that is the way which makes the least comparisons.
I don't know anything about algorithms (sorting), so all the info on that didn't really help me.
I think the best way would be this:
Step 1: Compare A to B
Step 2: Compare B to C
Step 3: Compare the two biggest
Step 4: Compare the two smallest.
Am i right?
adios,
biterman.