Knowee
Questions
Features
Study Tools

A binary search tree is generated by inserting following integers: 47, 20, 65, 6, 11, 63, 91, 10, 15, 42, 69, 39The number of nodes in the left subtree and right subtree of the root respectively.A7,5B7, 4C4, 7D5,7

Question

A binary search tree is generated by inserting following integers: 47, 20, 65, 6, 11, 63, 91, 10, 15, 42, 69, 39The number of nodes in the left subtree and right subtree of the root respectively.A7,5B7, 4C4, 7D5,7

🧐 Not the exact question you are looking for?Go ask a question

Solution

The root of the binary search tree (BST) is the first number, which is 47.

In a BST, all numbers to the left of the root are less than the root and all numbers to the right are greater.

So, let's break down the numbers:

Left subtree (less than 47): 20, 6, 11, 10, 15, 42, 39. That's 7 nodes.

Right subtree (greater than 47): 65, 63, 91, 69. That's 4 nodes.

So, the answer is B: 7, 4.

Similar Questions

Construct the Binary Search Tree of 5, 10, 4, 2, 16, 7, 1, 20, 15, 3

A binary search tree is a binary tree where:Group of answer choicesThe left subtree contains values less than the root, and the right subtree contains values greater than the root.Both b and d.It is always a complete binary tree.The data in the tree is stored in a specific order.

Where is the maximum number in a binary search tree? a) At the root of the tree. b) Anywhere other than root and leaf nodes c) At the leftmost leaf node. d) At the rightmost leaf node

Explain the process of inserting nodes into a binary search tree.give the answer for 5 marks

What is the starting point when searching a Binary Search Tree?Instruction: Choose the option that best answers the question. Answer Choicesthe root nodethe left nodethe right nodethe target node

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.