平衡的二叉搜索树问题
Balanced Binary Search Tree Questions
我是 c++ 的新手,我刚刚创建了一个平衡的二叉搜索树,我只是有几个问题。
1) What is the efficiency of inserting/looking up/ removing/ from an ideally balanced binary tree is big-O of?
2) How would I order A.go left, B. go right, C visit in pre-order, in-order and post-order traversal?
3) Last question is infinite recursion is one cause of an infinite loop?
提前致谢
1) The efficiency of inserting/looking up/ removing is O(log2(n))
if you didn't understand that I would recommend googling it
2) Pre-Order : Visit, go left and visit until leaf is reached, then go up and right & visit. Then repeat going left and visiting.
In order : Go to the left most child and visit, then go up and visit, then go right and visit. repeat from start.
Post- Order: A (visit last) A->B->C
3) And recursion isn't a loop.
I would recommend googling all these questions/ wiki has good information about binary search tree
相关文章:
- 这是一个二叉搜索树吗?黑客排名问题
- 插入操作的二叉搜索树代码问题
- 我的模板二叉搜索树类给出了错误"Node<T>: no appropriate default constructor available,"如何解决这个问题?
- 如何使用二叉搜索树的索引生成器解决此问题
- 错误 C2676;在C++的二叉搜索树类中定义 ++ 运算符时遇到问题
- 在二叉搜索树中插入时出现问题
- 二叉搜索树插入数据问题
- 二叉搜索树析构函数问题
- 我的二叉搜索树插入逻辑有什么问题?
- 二叉搜索树在插入功能方面有问题
- 模板二叉搜索树 ostream 过载问题
- 平衡的二叉搜索树问题
- 二叉搜索树:搜索功能问题
- C++二进制搜索树删除问题
- 二叉搜索树问题和数据结构问题
- 二进制搜索树问题
- C++AVL二进制搜索树问题
- 二进制搜索树问题
- 从二叉搜索树问题中删除叶子
- 二叉搜索树问题