All binary search trees are balanced - answer False
Which of the traversals in the binary search tree gives a sorted list? - answer In-order
If node K is to be deleted, the value of which node could be used to replace it? More
answers might be correct and you have to choose all of them - answerM, J
What statements are true? More answers might be correct. - answer- In a binary search
tree a new element is always added as a leaf.
- A binary search tree is a tree whose elements are organised to facilitate finding a
particular element when needed.
We consider an AVL tree with 7 nodes and we know that the height of a tree with a
single node is 0. What is the maximum height of our AVL tree? - answer3
Al binary search trees are balanced - answerFalse
BST search, insert, and delete operations typically run in time O(d). What is d? -
answerThe depth of the relevant node in the tree
The number of edges from the node to the deepest leaf is called______ of the tree. -
answerHeight
Which of the traversals in the binary search tree gives a sorted list? - answerIn-order
...........of binary tree starts by visiting the root current node, then its left child and then
its right child - answerPreorder traversal
What does the following piece of code do?
public void func (Tree root)
{
func(root.left());
func(root.right());
System.out.println(root.data());
} - answerPost-order traversal
Which of the following problems is not suitable to be solved with a tree? -
answerUndo/Redo operations in a notepad
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller Dreamer252. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $12.49. You're not tied to anything after your purchase.