GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Reading-Notes/401-10.md at main · RobbMAlexander/Reading-Notes

Expand file tree

/

401-10.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
49 lines (27 loc) · 882 Bytes
/

401-10.md

Copy path

File metadata and controls

49 lines (27 loc) · 882 Bytes
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions
layout page
title 401.10 Reading Notes
permalink /401-R10/

Stacks & Queues

Stacks

  • Stacks are Node-based data structures with some similarities to and some distinctions from linked lists. Nodes have references to the subsequent node.

  • Stack vocabulary:

    • Push into the stack

    • Pop out of a stack

    • Top of the stack is the most recently pushed node (and first to be popped out)

    • Peek at the top of the stack

  • Stack principles:

    • First-in, last-out (and vice-versa)

    • Bottom node references "null"

Queues

  • Queues are another "directional" data structure.

  • Common queue vocabulary:

    • Enque nodes to add to the queue

    • Dequeue nodes to remove from queue

    • Front first Node

    • Rear last Node

    • Peek at the front Node's held value

  • Queue principles:

    • First-in, first-out

    • Last-in, Last-out

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.