Tree traversalReversible algorithmsDesign of algorithmsProgram inversionWe 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 ...
tree traversalGiven the inorder traversal of a binary tree, along with one of its preorder or postorder traversals, the original binary tree can be uniquely identified. We present two construction algorithms: one, which requires O(N) time, is time optimal but space inefficient, and the other...
The present algorithm can not be applied to construct a binary tree by using the traversal sequences in which there are same elements. That is to say, the previous algorithms require there are not same elements in the binary tree. This paper designs an improved recursive algorithm to solve ...
Whenever we find the key and value during the traversal, we directly transform each one into a form of the key-value pair. Figure 15 shows the algorithm of the E-and-T method. First, it obtains the information for a given registry path to know the number of subkeys and the number of...