Back to Search Start Over

Explore a New Way to Convert a Recursion Algorithm into a Non-recursion Algorithm

Authors :
Yongping Gao
Fenfen Guan
Source :
Computer And Computing Technologies In Agriculture, Volume I ISBN: 9780387772509, CCTA
Publication Year :
2008
Publisher :
Springer US, 2008.

Abstract

This article discusses how to use queue to make non-recursion algorithm of binary link tree. As for a general binary tree, if we adopt sequence storage, firstly we should extend it first into a complete binary tree, secondly we store it to a temporary queue according to the sequence of up-down and left-right. On the basis of the properties of the complete binary tree and the queue, if we can confirm every element in the queue, then we can find the left and right children of the element in the queue. When we recur these steps, we can create a binary link bit tree. This algorithm enriches the method from recursion to non-recursion.

Details

ISBN :
978-0-387-77250-9
ISBNs :
9780387772509
Database :
OpenAIRE
Journal :
Computer And Computing Technologies In Agriculture, Volume I ISBN: 9780387772509, CCTA
Accession number :
edsair.doi...........6f3d124173fdc9f9b790a4dd3f7c61c9
Full Text :
https://doi.org/10.1007/978-0-387-77251-6_21