# Peek

*verb*

say it: **“PEEK”** **/pik/**

Reading the next item of a stack or a queue without removing it.

## What is **peek** on a stack or a queue?

**Peek** reads the item a stack or a queue would hand out next, without removing it: the top of a stack, or the front of a queue. Like glancing at who's next in line, it's O(1) and changes nothing.

## In a sentence

- “The barista can **peek** at the next order without taking it off the screen.”

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

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/peek
