What is the difference between a list and a set?

What is the difference between a list and a set?

Approach: Compare ordering and uniqueness.

A list is an ordered collection that allows duplicate elements. A set is an unordered collection that does not allow duplicate elements.

Follow-up: What is the lookup time for a set vs a list?

Key concepts: duplicates, index access.