data-structures-linked-lists Flashcards
1
Q
How are linked lists different from an array?
A
Linked lists are sequential access (in order to go to a specific place, you have to start at the beginning, then jump from node to node until you get there); arrays are random access (can access any value using the index)
2
Q
How would you access an arbitrary node in a linked list (not just the “head”)?
A
you have to start at the beginning, then jump from node to node until you get there