In this paper we derive a linear-time, constant-space algorithm to construct a binary heap whose inorder traversal equals a given sequence. We do so in two steps. First, we invert a program that computes the inorder traversal of a binary heap, using the proof rules for program inversion by W. Chen and J.T. Udding. This results in a linear-time solution in terms of binary trees. Subsequently, we data-refine this program to a constant-space solution in terms of linked structures.
CITATION STYLE
Schoenmakers, B. (1993). Inorder traversal of a binary heap and its inversion in optimal time and space. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 669 LNCS, pp. 291–301). Springer Verlag. https://doi.org/10.1007/3-540-56625-2_19
Mendeley helps you to discover research relevant for your work.