Data Structures Flashcards
What does the acronym LIFO mean?
Last in first out, the last thing pushed onto the stack is the first thing that can be popped out.
What methods are available on a Stack data structure?
push, pop, print
What must you do to access the value at an arbitrary point in a stack (not just the “top”)?
pop until you get to that value
What methods are available on a Queue data structure?
enqueue and dequeue
What must you do to access the value at an arbitrary point in a queue (not just the “front”)?
dequeue until you get to that value
What does the acronym FIFO mean?
First in First out.
How are linked lists different from an array?
Linked lists are sequential access (like a queue), not random access (like an array).
How would you access an arbitrary node in a linked list (not just the “head”)?
you have to use next until you get to the node