Abstract
The LNR/LRN New-type Threaded Binary Tree (LNR/LRN NTBT for short) is first proposed in this paper. It is shown that n, the number of nodes of the binary tree, is the time complexityFootnote * of the LNR-NTBT traversal algorithm, if there is a special pointer pointing to the first node in LNR order. But under the same condition, the time complexity of ordinary traversal algorithms for traditional LNR threaded binary trees is approximate to 2n. So the LNR-NTBT and its traversal algorithm are the best. The LRN-NTBT and its traversal algorithm are also very efficient.
For simplicity, we assume that the time cost of passing or visiting a node is the same constant c, where c = 1, and the auxiliary storage space of the algorithms is 0(1) in this paper.
For simplicity, we assume that the time cost of passing or visiting a node is the same constant c, where c = 1, and the auxiliary storage space of the algorithms is 0(1) in this paper.
Notes
For simplicity, we assume that the time cost of passing or visiting a node is the same constant c, where c = 1, and the auxiliary storage space of the algorithms is 0(1) in this paper.