Corvil interview question

Compute min/max