Summary
We give a representation for linked lists which allows to efficiently insert and delete objects in the list and to quickly determine the order of two list elements. The basic data structure, called an indexed BB [α]-tree, allows to do n insertions and deletions in O(n log n) steps and determine the order in constant time, assuming that the locations of the elements worked at are given. The improved algorithm does n insertions and deletions in O(n) steps and determines the order in constant time. An application of this provides an algorithm which determines the ancestor relationship of two given nodes in a dynamic tree structure of bounded degree in time O(1) and performs n arbitrary insertions and deletions at given positions in time O(n) using linear space.
Similar content being viewed by others
References
Blum, N., Mehlhorn, K.: On the average number of rebalancing operations in weight-balanced trees. Theor. Comput. Sci. 11, 303–320 (1980)
Dietz, P.: Maintaining order in a linked list. 14th annual ACM Symposium on Theory of Computing, pp. 122–127, 1982
Huddleston, S., Mehlhorn, K.: A new data structure for representing sorted lists. Acta Informat. 17, 157–184 (1982)
Lengauer, Th., Mehlhorn, K.: HILL-Hierarchical layout language, A CAD-system for VLSI-design. Technischer Bericht A 82/10, Universität des Saarlandes, 1982
Maier, D.: An efficient method for storing ancestor information in trees. SIAM J. Comput. 8, 599–618 (1979)
Mehlhorn, K.: Effiziente Algorithmen. Stuttgart: Teubner 1977
Nievergelt, J., Reingold, E.M.: Binary search trees of bounded balance. SIAM J. Comput. 2, 33–43 (1973)
Overmars, M.: A O(1) average time update scheme for balanced search trees. Bull. EATCS, pp. 27–29 (1982)
Tsakalidis, A.: Maintaining order in a generalized linked list. 6th GI-Conference on Theoretical Computer Science, Dortmund LNCS, Vol. 145, pp. 343–352, 1983
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Tsakalidis, A.K. Maintaining order in a generalized linked list. Acta Informatica 21, 101–112 (1984). https://doi.org/10.1007/BF00289142
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF00289142