Given those requirements, there's no need to sort. Just iterate the vector and store the highest temperature and the times it was recorded.