Include <algorithm> in utils.cpp