Skip to content
BytePatterns

Stacks & Queues

Two humble rules, LIFO and FIFO, doing surprisingly heavy lifting.

Stacks & Queues progress0 / 5
  1. Stack BasicsLast one in is the first one out.4m
  2. Valid ParenthesesA closing bracket must answer the newest opening one.5m
  3. Queue BasicsFirst one in is the first one out.4m
  4. Queue From Two StacksReverse a reversal and LIFO turns into FIFO.5m
  5. Monotonic StackKeep the stack ordered and every item waits only once.6m