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

Use of emphasis in speech

Generating a lot of language data with a theorem prover

"Litany Against Fear" in Present Tense

When it's time to party we will party hard

these are people who died

divine carrot

the frog

what it’s like to get nail phenolization

Why 0 to the power of 0 is 1

Lines and Points are Circles