Skip to content · ⁨דלג לתוכן⁩

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.
עברית

שתי דרכים לאחסון פריטים

  • ערימה ותור שניהם אחסנים סדרה של פריטים, אך הם שונים באיזה פריט יוצא קודם.
  • לערימה יש אופי LIFO: אחרון נכנס, ראשון יוצא — כמו ערימת צלחות.
  • לתור יש אופי FIFO: ראשון נכנס, ראשון יוצא — כמו תור אנשים.

Handout · ⁨חומר עזר⁩

Log in or create account · ⁨היכנס או צור חשבון⁩

IGCSE, A-Level & AP