Hi, say I have a vector that is currently being populated with some objects. I would like, as each object is added to the vector, to count the maximum number of equal objects currently in the vector. Would you know of any efficient algorithm that does this? Thank you.(adsbygoogle = window.adsbygoogle || []).push({});

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# [C++?] Counting the maximum number of equal objects in a vector

**Physics Forums | Science Articles, Homework Help, Discussion**