I suggest to change initial values to something clearly indicating the values have no meaning. As I said, initial max = min() can confuse readers as it means something.