 Direct access is required, or at least valuable, in many algorithms such as binary search, integer sorting, or certain versions of sieve of Eratosthenes.Other data structures, such as linked lists, sacrifice direct access to permit efficient inserts, deletes, or re-ordering of data.Self-balancing binary search trees may provide an acceptable compromise, where access time is not equal for all members of a collection, but the maximum time to retrieve a given member grows only logarithmically with its size.