You are viewing a single comment's thread. Return to all comments →
You can simplify it like this:
count = 1; //Reinitialize count if you found a new max
I this case you are traversing the vector only once.