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 - The Fusion of Science and Community**

Dismiss Notice

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

Loading...

Similar Threads for Counting maximum number | Date |
---|---|

C/++/# Easy way of counting # processeses running? | Nov 8, 2017 |

[Pascal] Counting letters in a row without arrays | Sep 15, 2013 |

Fortran, is it possible to count the number of times a particular valu | May 30, 2013 |

Fortran- maximum values | May 12, 2013 |

[C++] Efficiently counting the number of '1' bits inside blocks of a binary number | Jul 17, 2012 |

**Physics Forums - The Fusion of Science and Community**