Include <algorithm> for std::min() and max()

Change-Id: Ic3ab061ab8d3578130dfa8a637e5351d4f5d766e