I have a list of values, with some recurrences, e.g. : {1,2,2,3,3,3,3,7,8,1}
I want to store the unique values in this list in a data structure along with their counts.
--------------
|value |count|
--------------
| 1 | 2 |
--------------
| 2 | 2 |
--------------
| 3 | 4 |
--------------
| 7 | 1 |
--------------
| 8 | 1 |
--------------
which c++ standard library data structure will be the most efficient in doing so?
edit: i wont be modifying the structure in any way, i just want to know the count as the count will help me determine the output to a programming question.