Consider returning a Pair object, which contains both the minimum and maximum value.