Stacks As Linked Lists


I give you these pretty pictures to show how a stack is just a linked list, tilted 90 degrees.

Linked List

Stack

In this way, pre-pending to a list is equivalent to the push operation of a stack, removing Head is equivalent to pop , and getting the value of Head is equivalent to peek.

Related Posts

Sensing and Intuition

What Does Big Mean?

Astrology for Men

a perfectable programming language

An interactive Lean 4 blog post — click through for the full experience.

MBTI and AI

Double Date

Worse Than a Sranc

thanks whole foods lady

Another way of doing big O notation

Compactness of the Classical Groups