Info 021 - 4393 6630 / 021 - 963 74 238

cards against humanity card game 625

How might a class like

My question is: how might this idea be implemented? Most collections I’m familiar with essentially amount to (under the hood) some form of array,
cards against humanity black cards, in which order may not “matter,” but there is an order (which is why,
cards against humanity retailers, even though it doesn’t need to, enumeration will pretty much always go through an unchanged collection,
places to buy cards against humanity, be it List, Queue,
best cards against humanity, Stack, etc. in the same sequence).

If I had to guess, I might suggest that internally it could be a Dictionary>; but that actually seems quite dubious considering it wouldn’t make sense to use just any type T as a key.

What I’m expecting/hoping is that this is actually an established object type that has already been “figured out” somewhere, and that somebody who knows of this established type can tell me about it. It’s just so unusual to me one of those concepts that’s easy to understand in real life, but is difficult to translate into a usable class as a developer which is why I’m curious as to the possibilities.

Some responders have suggested that a Bag could be a form of a hashtable internally. This was my initial thought as well, but I foresaw two problems with this idea:

A hashtable is not all that useful when you don’t have a suitable hashcode function for the type in question.

cards against humanity game online 006

Your reactions

Add your comment

Make sure you enter the * required information where indicated. Please also rate the article as it will help us decide future content and posts. Comments are moderated – and rel="nofollow" is in use. Please no link dropping, no keywords or domains as names; do not spam, and do not advertise!