0 Bewertungen0% fanden dieses Dokument nützlich (0 Abstimmungen)
25 Ansichten1 Seite
The document is a table containing 20 questions about binary search trees. It includes questions about the properties of binary search trees, including that in-order traversal produces elements in increasing order; the balance factor of a node; implementations like sets and priority queues that can use balanced binary search trees; examples of preorder and postorder traversal; conditions for an optimal binary search tree; and the height of a full balanced binary tree with a given number of leaves. The table also contains answers and sources for each question.
The document is a table containing 20 questions about binary search trees. It includes questions about the properties of binary search trees, including that in-order traversal produces elements in increasing order; the balance factor of a node; implementations like sets and priority queues that can use balanced binary search trees; examples of preorder and postorder traversal; conditions for an optimal binary search tree; and the height of a full balanced binary tree with a given number of leaves. The table also contains answers and sources for each question.
The document is a table containing 20 questions about binary search trees. It includes questions about the properties of binary search trees, including that in-order traversal produces elements in increasing order; the balance factor of a node; implementations like sets and priority queues that can use balanced binary search trees; examples of preorder and postorder traversal; conditions for an optimal binary search tree; and the height of a full balanced binary tree with a given number of leaves. The table also contains answers and sources for each question.
Just enter a Y in the verification column if ans is confirmed, it will automatically turn green
S.No Questions Answer Verification Source (Link)
1 Which of the following is false about a binary search tree ? In order sequence gives decreasing order of elements Y Sanfoundary 2 The balance factor of a node in a binary tree is defined as ______ height of left subtree minus height of right subtree Y Sanfoundary 3 What is the speciality about the inorder traversal of a binary tree It traverses in an increasing order Y Sanfoundary 4 Which of the following data structures can be efficiently implemented using height balanced binary searchBoth tree. sets and priority queue Y Sanfoundary 5 What does the following piece of code do? public void func(Tree root){System.out.println(root.data());func(root.left()); Preorder traversal func(root.right());) Y Sanfoundary 6 What is the post order traversal for the following grapgh RPTML Y Sanfoundary The tree should not be modified and you should know how often the keys are accessed, it improves 7 what are conditions for an optimal binary search tree and what advantage the lookup cost Y Sanfoundary 8 What will be the height of a balanced full binary tree with 8 leaves 4 Y Sanfoundary - 9 ANS 9 Which of the above figures is a balanced binary tree Refer to image on the right side Y Sanfoundary What does the following piece of code do? public void func(Tree root) { func(root.left()); func(root.right()); 10 System.out.println(root.data()); } Post order Y 11 12 13 10 questions total 14 same as 5 th other question is there 15 16 17 18 19 20