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

Just because 2 things are dual, doesn't mean they're just opposites

Boolean Algebra, Arithmetic POV

discontinuous linear functions

Continuous vs Bounded

Minimal Surfaces

November 2, 2023

NTK reparametrization

Kate from Vancouver, please email me

ChatGPT Session: Emotions, Etymology, Hyperfiniteness

Some ChatGPT Sessions