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 ...
Because each node needs to be charged, the time required can be calculated by formula (11). The mobile charging node passes through the traversal graph and completes charging for every node. So the total time used will be got according to formula (12). It is less than\(T\). From formu...
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 ...