View on GitHub

reading-notes

Reading notes for Codesfellows Coding

Stacks & Queues

Sound a lot like a link list?

FILO - First In Last Out

LIFO - ^^reverse

The Stack

It looks to operate like a link list accept your working on the active end of the stack or the (tail).

Also I find it a bit odd that the term “head” is used when it is so closely related to data storage and the active component(or location) of a storage system (i.e. HDD). Strange no?

Push

Pop

Peek

IsEmpty

The Queue

Enqueue

Dequeue

Front

Rear

Peek

IsEmpty