Back to the Problem
One pass keeping both the minimum and maximum; the answer is their difference.
Complexity: O(N)