RecapDifficulty: Advanced1 min

What a Set Refuses, and What a Queue Chooses

Five things this topic established, and where each one was.

What the topic established, and which card it was on
The thingWhere
A set decides duplication with hashCode and equals on the elementA Collection That Decides What Counts as a Duplicate
add returns whether the element was new, which saves a second lookupAdding the Same Order Twice
HashSet has no order, LinkedHashSet keeps insertion order, TreeSet sortsThree Orderings, Three Costs
A priority queue is a heap, so only the front element is in orderWhy Printing a PriorityQueue Does Not Show Poll Order
Use ArrayDeque for both queues and stacks; Stack is a 1996 classWhy the Stack Class Still Exists

Both halves of this topic are collections that make a decision for you. A set decides what is the same; a queue decides what is next. Choosing one means choosing whose decision you want.