Skip to main content
10 events
when toggle format what by license comment
Jul 2, 2015 at 22:05 history tweeted twitter.com/#!/StackCompSci/status/616729519160983553
Jul 1, 2015 at 10:25 history edited Raphael
edited tags
Jun 29, 2015 at 23:43 comment added babou The choice of the data structure is very dependent on the operations you need on that structure. In your case, you do no say how the information stored is to be used. If it is never used, you can replace your memory by a block of wood. If it is to be used, you have to say how. You call it an ordered multiset, but that could corresponds to different uses, requiring different representation. As your question stands, the right data structure could be an array of size 0.
Jun 29, 2015 at 20:59 comment added Raphael I'm not aware of a special name in CS. In OOP, you'd just use a usual ordered Collection (maybe wrapped so you get nice methods for your purposes) and give the objects you store a counter, so nothing special there either.
Jun 29, 2015 at 20:54 comment added Steve Moser @Raphael I was just wondering if there is a better name for this so I could communicate it better to others. Also maybe find what the expectation would be for an API into this data structure. For example would asking for the last element in this structure return just an item or a tuple containing the item and its count.
Jun 29, 2015 at 20:51 comment added Raphael The computer science answer seems obvious (maybe it isn't if you haven't been brainwashed) so I'm not sure what you are after. Do you want to know how to program this?
Jun 29, 2015 at 20:50 answer added Raphael timeline score: 2
Jun 29, 2015 at 20:39 history edited Steve Moser CC BY-SA 3.0
added 2 characters in body
Jun 29, 2015 at 20:31 review First posts
Jun 29, 2015 at 21:16
Jun 29, 2015 at 20:27 history asked Steve Moser CC BY-SA 3.0