Data Structures Flashcards
What does the acronym LIFO mean?
Last in First Out
What methods are available on a Stack data structure?
push and pop (most important ones)
What must you do to access the value at an arbitrary point in a stack (not just the “top”)?
Pop until you get to the value
What does the acronym FIFO mean?
First in First Out
What methods are available on a Queue data structure?
enqueue and dequeue (most important ones)
What must you do to access the value at an arbitrary point in a queue (not just the “front”)?
Dequeue -> Peek -> Enqueue
How are linked lists different from an array?
You can access an array by the index
How would you access an arbitrary node in a linked list (not just the “head”)?
list.next