Random access
|
In computer science, random access is the ability to access a random element of a group in equal time. The opposite is sequential access, where a remote element takes longer time to access. A typical illustration of this distinction is the ancient scroll (sequential) and the book where any random page can be flipped open immediately. A more modern example is computer storage on magnetic tape on spools (sequential) and hard disks (random access). The term random access memory (RAM), however, is used for semiconductor chip memory circuits used in computers. (The term was also used to describe ferrite-core memory in early computers).
In data structures, random access implies the ability to access the kth entry in a list of numbers in constant time. Very few data structures can guarantee this, primarily arrays. Random access is critical to many algorithms such as quicksort and binary search. Other data structures, such as linked lists, sacrifice random access to make other operations, such as inserting, deleting, or searching cheaper.