Bag, queue, and stack implementation