Imagine opening a phone book to a known page instead of turning every page from the beginning. Random access lets you jump directly to an element by its position. Sequential access is different: you read elements one by one from the start. Linked lists generally require sequential access, while arrays provide random access. section 2.8
Finding the tenth element
To read the 10th element of a linked list, you must read the first nine elements and follow their links. With an array, you can jump straight to the 10th element because its position is directly calculable. section 2.8 section 2.4
Calculating an array position
Suppose an array has five items and begins at address 00. The fifth item is at address 04. Knowing the starting address and position makes direct lookup possible; linked-list elements may be scattered, so their links must be followed. section 2.4
Random access makes arrays useful when an application repeatedly jumps among elements. Arrays can also make sequential reads faster because nearby items can be read together through caching. Linked lists remain useful when items are read one at a time, but jumping around requires repeated link traversal. section 2.8 section 2.4
Use the memory-layout illustration to compare direct array positions with linked-list links. section 2.4
