在一个二叉搜索树中插入10个元素C++数据结构原题:the ten keys Q.W.E.R.T.Y.U.I.O.P should be inserted one by one into a binary search tree.(the tree is initially empty.)(主要是看不明白.字母还可以比大小嘛.draw the b
来源:学生作业帮助网 编辑:作业帮 时间:2024/06/26 01:49:30
![在一个二叉搜索树中插入10个元素C++数据结构原题:the ten keys Q.W.E.R.T.Y.U.I.O.P should be inserted one by one into a binary search tree.(the tree is initially empty.)(主要是看不明白.字母还可以比大小嘛.draw the b](/uploads/image/z/7970408-8-8.jpg?t=%E5%9C%A8%E4%B8%80%E4%B8%AA%E4%BA%8C%E5%8F%89%E6%90%9C%E7%B4%A2%E6%A0%91%E4%B8%AD%E6%8F%92%E5%85%A510%E4%B8%AA%E5%85%83%E7%B4%A0C%2B%2B%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E5%8E%9F%E9%A2%98%EF%BC%9Athe+ten+keys+Q.W.E.R.T.Y.U.I.O.P+should+be+inserted+one+by+one+into+a+binary+search+tree.%28the+tree+is+initially+empty.%29%EF%BC%88%E4%B8%BB%E8%A6%81%E6%98%AF%E7%9C%8B%E4%B8%8D%E6%98%8E%E7%99%BD.%E5%AD%97%E6%AF%8D%E8%BF%98%E5%8F%AF%E4%BB%A5%E6%AF%94%E5%A4%A7%E5%B0%8F%E5%98%9B.draw+the+b)
在一个二叉搜索树中插入10个元素C++数据结构原题:the ten keys Q.W.E.R.T.Y.U.I.O.P should be inserted one by one into a binary search tree.(the tree is initially empty.)(主要是看不明白.字母还可以比大小嘛.draw the b
在一个二叉搜索树中插入10个元素C++数据结构
原题:
the ten keys Q.W.E.R.T.Y.U.I.O.P should be inserted one by one into a binary search tree.(the tree is initially empty.)(主要是看不明白.字母还可以比大小嘛.
draw the binary search tree after each insertion.(只要能给我最后的二叉搜索树的结果就好)
what is the height of the final tree.(求下树高.)
construct a binary search tree with the smae ten keys that is lower than the tree just obtained..
谢过
在一个二叉搜索树中插入10个元素C++数据结构原题:the ten keys Q.W.E.R.T.Y.U.I.O.P should be inserted one by one into a binary search tree.(the tree is initially empty.)(主要是看不明白.字母还可以比大小嘛.draw the b
字母的比较大小就是按照字母表的顺序来的,A最小Z最大.这个题可以采用递归算法,思路如下:先跟根节点比较(树空第一个插入的节点是树根),比根节点小,插入到左子树;比根节点大,插入到右子树,一次插入,每次只能插入在叶子节点.这个是数据结构的问题,找本教材都会有伪代码.