reading-notes

View the Project on GitHub TrunkOfUkuleles/reading-notes

Stack

Both utilize an object called a node that tracks a value, and a reference to the next node in the list

## FILO First in, Last out. the order which the program handles the linked list. The head is the first element of the liust, but the traversal has the add/remove point be at the end

## LIFO Same idea but When you add to a list it add to the end, and popping will take the element from the head, and make the next node the head.

# Push
   If you are putting to the head, then it is a simple O(1).

# Peek
    only see's the tope, so real fast O(1)



## Queue

enqueue - add node to the end of the LL
dequeue - take the element from the head, and reassign the head
front  - top
rear - back
peek - see the value of the top


Queues are FIFO