Discussion on Array-Based Lists
Discover more aspects regarding array-based lists.
We'll cover the following
Additional notes
Most of the data structures described in this chapter are folklore. They can be found in implementations dating back over years. For example, implementations of stacks, queues, and deques, which generalize easily to the ArrayStack
, ArrayQueue
and ArrayDeque
structures described here, are discussed by
RootishArrayStack
and prove a lower-bound. They also present a different structure that uses a more sophisticated choice of block sizes in order to avoid computing square roots in the i2b(i)
method. Within their scheme, the block containing is block , which is simply the index of the leading bit in the binary representation of . Some computer architectures provide an instruction for computing the index of the leading -bit in an integer. In Java, the Integer
class provides a method numberOfLeadingZeros(i)
from which one can easily compute
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy