(8.3.1)--ch8-03-二叉排序树的基本概念与查找.pdf
《(8.3.1)--ch8-03-二叉排序树的基本概念与查找.pdf》由会员分享,可在线阅读,更多相关《(8.3.1)--ch8-03-二叉排序树的基本概念与查找.pdf(9页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、 Sequential SearchData Structures and Algorithms Basic Concepts and Search of Binary Search Trees Data Structures and AlgorithmsData Structures and AlgorithmsChapter 8 Searchstatic search tablestatic search tableSearchSearch performance,best to achieve performance,best to achieve O(logn)O(logn),the
2、table is the table is orderedorderedInsert and delete Insert and delete performance,best performance,best to achieve to achieve O(1)O(1),chainchain storage storageData Structures and AlgorithmsData Structures and AlgorithmsChapter 8 Search8.2 Tree-based searchThe definition of the The definition of
3、the binary sort tree binary sort tree is:is:the the binary sort tree binary sort tree is either an is either an emptyempty tree;or tree;ora binary tree with the following characteristics:a binary tree with the following characteristics:First,if its left subtree is not empty,then First,if its left su
4、btree is not empty,then all all the node values on the left subtree should be less the node values on the left subtree should be less than the value of the rootthan the value of the root;Third,its Third,its left and right subtrees are also a left and right subtrees are also a binary sort treebinary
5、sort tree.Second,if its right subtree is not Second,if its right subtree is not empty,thenempty,then all all node values on the right subtree should be greater node values on the right subtree should be greater than the value of the root nodethan the value of the root node;binary sort treebinary sor
6、t treeData Structures and AlgorithmsData Structures and Algorithmseg.eg.4 4503080209010854035252388a binary sort treea binary sort tree66NotChapter 8 Search8.2 Tree-based search binary sort treebinary sort treeData Structures and AlgorithmsData Structures and Algorithms550308020908540358832eg.binary
7、 sort treebinary sort treefind the keywordfind the keyword=50,35,90,953080209085403588325050304035508090failChapter 8 Search8.2 Tree-based searchData Structures and AlgorithmsData Structures and AlgorithmsBinary Sort TreeBinary Sort Treesearch processsearch process6First,if the given value is First,
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 8.3 ch8 03 二叉排序树 基本概念 查找
限制150内