How to find the mode of a vector in C++