data-structures-linked-lists Flashcards
1
Q
How are linked lists different from an array?
A
Linked lists are sequential access (like a queue), not random access (like an array). However, unlike a queue, a linked list doesn’t need to be mutated to scan its contents.
2
Q
How would you access an arbitrary node in a linked list (not just the “head”)?
A
You to apply the next property to the head node repeatedly until you get to the arbitrary point