Abstract
We cast two algorithms to generate the inorder and preorder of the labels of a binary tree in the context of reversible computing nearly three decades after they were first examined in the light of program inversion. The reversible traversals directly define the inverse algorithms that reconstruct the binary tree and have the same linear time and space requirements as the traversals. A reversible while-language is extended with reversible recursion-
Original language | English |
---|---|
Journal | Information Processing Letters |
Volume | 147 |
Pages (from-to) | 32-37 |
Number of pages | 6 |
ISSN | 0020-0190 |
DOIs | |
Publication status | Published - Jul 2019 |