Reasons for using a Bag in Java
问题 I am currently studying about Algorithms & Data Structures and while I was reading over the Book of Algorithms 4th edition, I discovered the Bag data-structure together with the Stack and Queue . After reading the the explanation of it, it is still unclear to me what would I prefer using a Bag (which has no remove() method) over other data-structures such as Stack , Queue , LinkedList or a Set ? As far as I can understand from the Book, the implementation of a Bag , is the same as for a Stack