检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:唐自立[1]
机构地区:[1]苏州大学计算机科学与技术学院,江苏苏州215006
出 处:《计算机应用与软件》2005年第4期107-109,共3页Computer Applications and Software
摘 要:所有传统的删除AVL树的结点的算法的主要思想都是先删除结点再自下而上处理某些子树,涉及自下而上的后退。提出一种新的删除AVL树的结点的算法,其主要思想是先自上而下处理某些子树再删除结点,不涉及自下而上的后退。举例说明新算法的执行过程。证明新算法是正确的。与目前通常采用的Foster的算法相比,新算法不涉及辅助栈的使用。设n是AVL树的结点的个数。新算法的时间复杂性是O(log2n),与Foster的算法相同。实验结果表明新算法的平均执行时间比Foster的算法的短。新算法的空间复杂性是O(1),比Foster的算法的低。The main idea of every traditional algorithm for deleting a node from an AVL tree is to delete the node first and then to process certain subtrees from below to above,relating to the backtracking from below to above.A new algorithm for deleting a node from an AVL tree is presented,whose main idea is to process certain subtrees from above to below first and then to delete the node,instead of relating to the backtracking from below to above.The execution of the new algorithm is illustrated by an example.The new algorithm is proved correct.Compared with Foster's algorithm,which is commonly adopted at present,the new algorithm does not relate to the use of an auxiliary stack.Let n be the number of nodes of an AVL tree.The time complexity of the new algorithm is O(log_2n),and it is the same as that of Foster's algorithm.Experimental results show that the average execution time of the new algorithm is shorter than that of Foster's algorithm.The space complexity of the new algorithm is O(1),and it is lower than that of Foster's algorithm.
关 键 词:AVL树 结点 删除 FOSTER 新算法 时间复杂性 空间复杂性 自上而下 执行过程 时间比 子树 思想
分 类 号:TP311.13[自动化与计算机技术—计算机软件与理论] TP311.12[自动化与计算机技术—计算机科学与技术]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.15