Purely functional, real-time deques with catenation

Citation
H. Kaplan et Re. Tarjan, Purely functional, real-time deques with catenation, J ACM, 46(5), 1999, pp. 577-603
Citations number
45
Categorie Soggetti
Computer Science & Engineering
Journal title
Volume
46
Issue
5
Year of publication
1999
Pages
577 - 603
Database
ISI
SICI code
Abstract
We describe an efficient, purely functional implementation of deques with c atenation. In addition to being an intriguing;problem in its own right, fin ding a purely functional implementation of catenable deques is required to add certain sophisticated programming constructs to functional programming languages. Our solution has a worst-case running time of O(1) for each push , pop, inject, eject and catenation, The best previously known solution has an O(log* k) time bound for the krh deque operation. Our solution is not o nly faster but simpler. A key idea used in our result is an algorithmic tec hnique related to the redundant digital representations used to avoid carry propagation in binary counting.