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

  • Yongping Gao
  • Fenfen Guan
Part of the The International Federation for Information Processing book series (IFIPAICT, volume 258)

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.


sequence storage bit link tree queue recursion non-recursion 


  1. Changbao Shu, Zhenhai Liu, A Non-recursion Algorithm about Tower of Hanoi, Computer Development & Applications, Vol. 15, No. 11, 2002, pp. 33-34.Google Scholar
  2. Chuanhong Chen, Wuying Shen, The Research and Application of Traversing Binary Tree, Journal of Xiaogan University, Vol. 25, No. 3, 2005, pp. 72-73.Google Scholar
  3. Chunbao Li, Hui Zeng, Zhimin Zhang, Praxis of Program of Data Structure, The Press of Qinghua University, 2002.Google Scholar
  4. Fuying Wu, Luosheng Tan, Mingwen Wang, Nonrecursive Algorithm of Inorder Traversing Sequential Storage Full Binary, Journal of Jiangxi Normal University (Natural Sciences Edition), Vol. 27, No. 4, 2003, pp. 372-375.Google Scholar
  5. Naixiao Zhang, Algorithm and Data Structure, Higher Education Press, 2002.Google Scholar
  6. Shuqun Gong, Yu Ren, Weiwei Chen, The Front and Rear Pointer Design of Circular Queue GONG, Modem Computer, No. 2, 2007, pp. 17-20.Google Scholar
  7. Tao Zhu. Judging Fully Binary Tree on the Basis of Traversing Binary Tree [J]. Journal of Honghe University , Vol. 3, No. 6, 2005, pp. 47-48.Google Scholar
  8. Wanlan Tian, The Discussion of Inorder-traversing and Postorder-traversing Binary-tree with Recursive Algorithm, Journal of Liangshan University, Vol. 5, No. 3, 2003, pp. 3-3.Google Scholar
  9. Weimin Yan, Weimin Wu, Data Structure (C Language), The Press of Qinghua University, 1997.Google Scholar
  10. Xiaoyun Guo, Non-recursive Simulation on Recursive Function, Journal of Xuzhou Normal University (Natural Science Edition), Vol. 22, No. 1, 2004, pp. 40-42.Google Scholar
  11. Yongping Gao, Shumin Zhou, Use Stack to Make the Non-recursion Algorithm of Bit Link Tree, Computer Era, No. 11, 2005, pp. 24-25.Google Scholar
  12. Yuansong Li, New Method of Traversing Binary Tree, Journal of Sichuan University of Science & Engineering (Natural Sicence Edition), Vol. 16, No. 4, 2003, pp. 45-46.Google Scholar
  13. Yuli Yuan, Ling Hu, The Teaching Analysis of Inorder Traversing Binary Tree in the Data Structure, Journal of Neijiang Teachers College, Vol. 21, No. 4, 2006, pp. 109-111.Google Scholar
  14. Zhenyuan Zhu, Cheng Zhu, Non-recursive Implementation of Recursive Algorithm, MiniMicro Systems, Vol. 24, No. 3, 2003, pp. 567-570.Google Scholar
  15. Zhili Tang, Methods for uniquely determining a tree or a binary tree based on its traversal sequences, Mini-Micro Systems, Vol. 22, No. 8, 2001, pp. 985-988.Google Scholar
  16. Zhong Li , Recursive Algorithm Transform into Non-recursive Algorithm , Computer Science, Vol. 28, No. 8, 2001, pp. 96-98.Google Scholar
  17. Zhong Li, Lin Meng, Dehui Yin, A discussion of postorder-traverse binary tree with norecursive algorithm, Journal of Southwest University for Nationalities (Natrual Science Edition), Vol. 29, No. 5, 2003, pp. 537-538.Google Scholar

Copyright information

© IFIP International Federation for Information Processing 2008

Authors and Affiliations

  • Yongping Gao
    • 1
  • Fenfen Guan
    • 1
  1. 1.School of Information TechnologyEast China Institue of TechnologyChina

Personalised recommendations