Skip to main content

Computer ScienceFor 10th gradeData structures

Stack and queue

Push letters into a stack or a queue, then take some out. Which letter comes out first?

Structure
Items left
3
First out
D

The stack gives back D first: last in, first out.

Used in