# Set

*noun*

say it: **“SET”** **/sɛt/**

A collection that holds each item at most once and answers quickly whether an item is in it.

## What is a **set**?

A **set** holds each item at most once, like a guest list where every name appears one time. It's a hash table that keeps only keys, so checking whether an item is in it is O(1) on average. Making a set from a list removes the duplicates.

## In a sentence

- “Maya scanned her card twice, but the **set** of visitors holds her name only once.”

Level: Apprentice · [More Data Structures terms at this level](https://www.ask-codey.com/glossary?category=data-structures&level=2)

Updated: November 9, 2026

## In other subjects

- [Set in Java](https://www.ask-codey.com/glossary/set-java)
- [Set in JavaScript](https://www.ask-codey.com/glossary/set-javascript)
- [Set in Python](https://www.ask-codey.com/glossary/set)

Source: https://www.ask-codey.com/glossary/set-data-structures
