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
What must you do to access the value at an arbitrary point in a stack (not just the “top”)?
Pop each of the values that are on top of the intended value
What does the acronym FIFO mean?
First In First Out
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 values until you reach the arbitrary point
How are linked lists different from an array?
Each node contains a reference to the next node, ending with a null value. No indeces to access specific points
How would you access an arbitrary node in a linked list (not just the “head”)?
Using .next an arbitrary number of times