Optimized to work with random and non-random access lists