Hostname: page-component-586b7cd67f-2brh9 Total loading time: 0 Render date: 2024-12-03T19:18:31.773Z Has data issue: false hasContentIssue false

Functional Pearls A symmetric set of efficient list operations

Published online by Cambridge University Press:  07 November 2008

Rob R. Hoogerwoord
Affiliation:
Department of Mathematics and Computing Science, Eindhoven University of Technology, PO Box 513, 5600 M B Eindhoven, The Netherlands
Rights & Permissions [Opens in a new window]

Extract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

In this paper we show that it is possible to implement a symmetric set of finite-list operations efficiently; the set is symmetric in the sense that lists can be manipulated at either end. We derive the definitions of these operations from their specifications by calculation. The operations have O(1) time complexity, provided that we content ourselves with, so-called, amortized efficiency, instead of worst-case efficiency

Type
Articles
Copyright
Copyright © Cambridge University Press 1992

References

Gries, D. 1981. The Science of Programming. Springer-Verlag.CrossRefGoogle Scholar
Tarjan, R. E. 1985. Amortized computational complexity. SIAM J. on Algebraic and Discrete Methods, 6: 306318.CrossRefGoogle Scholar
Submit a response

Discussions

No Discussions have been published for this article.