高级检索

    递归算法的非递归实现

    NON-RECURSIVE REALIZATION OF RECURRENCE ALGORITHM

    • 摘要: 递归以其算法简单清晰、可读性强及易实现而具有很好的理论价值,但在实际应用时,递归过程用到的大量数据不管有用无用都需要保存,而当递归层次多到一定程度,将耗尽系统内存资源,因此很少在真正的实际应用中使用,实用性较差。如果可以设计出一种既保持递归算法简单、清晰、易实现的优点,又能避免递归算法极耗内存缺陷的新型递归算法,将是一件十分有意义的事情。本文将采用双向链表数据结构来完成通用递归算法的非递归实现。

       

      Abstract: Recurrence has useful theoretical value for its simplicity, intelligibility, readability andrealizability. But it involves so many useful and useless data to be saved in recursive procedure sothat it exhausts all the memory resources when it gets into a certain layer. For this reason, recurrence is seldom used in real application and its practicality is not satisfactory. It will be of greatsignificance to find out a new type recurrence algorithm that keeps advantages of simplicity, intelligibility, readability and realizability on one side and avoids ti,p disadvantage of exhausting a lotof memory resources on the other.This paper describes how to realize recurrence algorithm by using a non--recurrence strategysuch as a two-way chain-list.

       

    /

    返回文章
    返回