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

Some ChatGPT Sessions

2016 ML thoughts

My biggest takeaway from Redwood Research REMIX

finite, actual infinity, potential infinity

Actions and Flows

PSA: reward is part of the habit loop too

a kernel of lie theory

The hyperfinite timeline

Slick hyperfinite Ramsey theory proof

Gaoxing Guy