Bỏ qua nội dung

Stacks and queues (array-backed)

English

Two ways to hold items

  • A stack and a queue both hold a line of items, but they differ in which item comes out next.
  • A stack is LIFO: Last In, First Out — like a pile of plates.
  • A queue is FIFO: First In, First Out — like a line of people.

Tài liệu

Đăng nhập hoặc tạo tài khoản

IGCSE, A-Level & AP