文件名称:piaoliang
介绍说明--下载内容均来自于网络,请自行研究使用
在二叉搜索树上删除一个有两个子女的结点时,可以采用以下三种方法:
(1) 用左子树TL上具有最大关键码的结点X顶替,再递归地删除X。
(2) 交替地用左子树TL上具有最大关键码的结点和右子树TR上具有最小关键码的结点顶替,再递归地删除适当的结点。
(3) 用左子树TL上具有最大关键码的结点或者用右子树TR上具有最小关键码的结点顶替,再递归地删除适当的结点。可随机选择其中一个方案。
-two forks in search of a tree to delete two children nodes, can be used in three ways : (1) to use the left subtree TL on key codes with the greatest of nodes replace X, then X - recursive deleted. (2) to use the turn of the left subtree TL on key codes with the greatest of nodes and right subtrees TR is the smallest key codes node replacement and then recursively to delete the appropriate nodes. (3) The left subtree TL on key codes with the greatest of nodes or use the right subtrees TR is the smallest on the key code top node for further recursion to delete the appropriate nodes. Which can be a random selection program.
(1) 用左子树TL上具有最大关键码的结点X顶替,再递归地删除X。
(2) 交替地用左子树TL上具有最大关键码的结点和右子树TR上具有最小关键码的结点顶替,再递归地删除适当的结点。
(3) 用左子树TL上具有最大关键码的结点或者用右子树TR上具有最小关键码的结点顶替,再递归地删除适当的结点。可随机选择其中一个方案。
-two forks in search of a tree to delete two children nodes, can be used in three ways : (1) to use the left subtree TL on key codes with the greatest of nodes replace X, then X - recursive deleted. (2) to use the turn of the left subtree TL on key codes with the greatest of nodes and right subtrees TR is the smallest key codes node replacement and then recursively to delete the appropriate nodes. (3) The left subtree TL on key codes with the greatest of nodes or use the right subtrees TR is the smallest on the key code top node for further recursion to delete the appropriate nodes. Which can be a random selection program.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
压缩包 : 91331988piaoliang.rar 列表 新建 文本文档.txt