COMP: Added <algorithm> include for compilation on windows