Skip to content · ⁨Lompat ke konten⁩

Stacks and queues (array-backed) · ⁨Tumpukan dan antrean (berbasis array)⁩

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.
Bahasa Indonesia

Dua cara menyimpan item

  • Stack dan queue keduanya menyimpan barisan item, tetapi berbeda dalam item mana yang keluar selanjutnya.
  • Stack bersifat LIFO: Last In, First Out — seperti tumpukan piring.
  • Queue bersifat FIFO: First In, First Out — seperti antrian orang.

Handout · ⁨Lembar Kerja⁩

Log in or create account · ⁨Masuk atau buat akun⁩

IGCSE, A-Level & AP