Hostname: page-component-77f85d65b8-g4pgd Total loading time: 0 Render date: 2026-04-22T20:32:48.892Z Has data issue: false hasContentIssue false

Simple and efficient purely functional queues and deques

Published online by Cambridge University Press:  07 November 2008

Chris Okasaki
Affiliation:
School of Computer Science, Carnegie Mellon University, 5000 Forbes Avenue, Pittsburgh, PA 15213, USA (e-mail: cokasaki@cs.cmu.edu)
Rights & Permissions [Opens in a new window]

Abstract

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.

We present purely functional implementations of queues and double-ended queues (deques) requiring only O(1) time per operation in the worst case. Our algorithms are considerably simpler than previous designs with the same bounds. The inspiration for our approach is the incremental behaviour of certain functions on lazy lists.

Information

Type
Articles
Copyright
Copyright © Cambridge University Press 1995
Submit a response

Discussions

No Discussions have been published for this article.