Resizable arrays in optimal time and space

41Citations
Citations of this article
26Readers
Mendeley users who have this article in their library.
Get full text

Abstract

We present simple, practical and efficient data structures for the fundamental problem of maintaining a resizable one-dimensional array, A[l..l + n − 1], of fixed-size elements, as elements are added to or removed from one or both ends. Our structures also support access to the element in position i. All operations are performed in constant time. The extra space (i.e., the space used past storing the n current elements) is O(√n) at any point in time. This is shown to be within a constant factor of optimal, even if there are no constraints on the time. If desired, each memory block can be made to have size 2k − c for a specified constant c, and hence the scheme works effectively with the buddy system. The data structures can be used to solve a variety of problems with optimal bounds on time and extra storage. These include stacks, queues, randomized queues, priority queues, and deques.

Cite

CITATION STYLE

APA

Brodnik, A., Carlsson, S., Demaine, E. D., Munro, J. I., & Sedgewick, R. (1999). Resizable arrays in optimal time and space. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 1663, pp. 37–48). Springer Verlag. https://doi.org/10.1007/3-540-48447-7_4

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free