Data Structures Flashcards
What does the acronym LIFO mean?
Last-in-first-out.
What methods are available on a Stack data structure?
.push(), .pop(), .peek() (convenience method), and .print() (debugging method)
What must you do to access the value at an arbitrary point in a stack (not just the “top”)?
Continuously pop until the arbitrary point is reached.
What does the acronym FIFO mean?
First-in-first-out.
What methods are available on a Queue data structure?
.enqueue(), .dequeue(), and .peek() (convenience method).
What must you do to access the value at an arbitrary point in a queue (not just the “front”)?
Continuously dequeue until the arbitrary point is reached.
How are linked lists different from an array?
Linked lists have a
How would you access an arbitrary node in a linked list (not just the “head”)?
Continuously next(ing) until the arbitrary point is reached.