Is there a name for a counted set (multiset) that is ordered?
For example lets say this data structure represents a shopping cart (or basket if you're British). The shopping cart shows the order the items were added to the cart unless an item of the same type was already added in which case a number associated with item is incremented.
Is this a well studied data structure or just a specialized multiset? I imagine it could be represented with an internal data structure of a dictionary and an array.
Collection
(maybe wrapped so you get nice methods for your purposes) and give the objects you store a counter, so nothing special there either. $\endgroup$