Jump to content

C++ Language/Std/Stl/Algorithms/Querying/Counting

From Wikibooks, open books for an open world

A sorted collection has a built-in mapciVar.count('i') member function that is most efficient. But for a sequence collection, you need to use the count() algorithm.

Additional information about counting algorithms (includes interactive examples)