Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 869 Bytes

File metadata and controls

17 lines (12 loc) · 869 Bytes

Stack & Queue Utilities

Stacks (FILO) and queues (FIFO) model expression parsing, backtracking, and history navigation. Use arrays as stacks, and emulate queues with circular buffers or two stacks when necessary.

Reasoning playbook

  • Push on opening tokens and pop on matching closers; keep a map of pairs for clarity.
  • Evaluate expressions by using stacks for operands/operators and handling precedence explicitly.
  • Simulate queue behavior (for BFS or caches) with arrays or linked lists when built-in queues are unavailable.

Problems & notes