Without algorithm header, Visual Studio complaints that std::max is not declared and defined. Including algorithm header resolves this issue.