Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  A binary search tree is generated by insertin... Start Learning for Free
A binary search tree is generated by inserting in order of the following integers: 50, 15, 62, 5, 20, 58, 91, 3, 8, 37, 60, 24. The number of nodes in the left subtree and right subtree of the root respectively is
  • a)
    (4, 7)
  • b)
    (7,4)
  • c)
    (8,3)
  • d)
    (3,8)
Correct answer is option 'B'. Can you explain this answer?
Verified Answer
A binary search tree is generated by inserting in order of the followi...
The binary search tree is

The number of nodes in the left subtree and right subtree of the root respectively is (7, 4).
View all questions of this test
Most Upvoted Answer
A binary search tree is generated by inserting in order of the followi...
Explanation:
To determine the number of nodes in the left subtree and right subtree of the root, we need to construct the binary search tree using the given integers.

Step 1: Insert the first integer, 50, as the root of the tree.

```
50
```

Step 2: Insert the second integer, 15. Since 15 is less than 50, it becomes the left child of 50.

```
50
/
15
```

Step 3: Insert the third integer, 62. Since 62 is greater than 50, it becomes the right child of 50.

```
50
/ \
15 62
```

Step 4: Insert the fourth integer, 5. Since 5 is less than 50 and less than 15, it becomes the left child of 15.

```
50
/ \
15 62
/
5
```

Step 5: Insert the fifth integer, 20. Since 20 is greater than 15 and less than 50, it becomes the right child of 15.

```
50
/ \
15 62
/ \
5 20
```

Step 6: Insert the sixth integer, 58. Since 58 is less than 62 and greater than 50, it becomes the left child of 62.

```
50
/ \
15 62
/ \ /
5 20 58
```

Step 7: Insert the seventh integer, 91. Since 91 is greater than 62, it becomes the right child of 62.

```
50
/ \
15 62
/ \ / \
5 20 58 91
```

Step 8: Insert the eighth integer, 3. Since 3 is less than 50, 15, and 5, it becomes the left child of 5.

```
50
/ \
15 62
/ \ / \
5 20 58 91
/
3
```

Step 9: Insert the ninth integer, 8. Since 8 is greater than 5 and less than 15, it becomes the right child of 5.

```
50
/ \
15 62
/ \ / \
5 20 58 91
/ \
3 8
```

Step 10: Insert the tenth integer, 37. Since 37 is greater than 20 and less than 50, it becomes the right child of 20.

```
50
/ \
15 62
/ \ / \
5 20 58 91
/ \
8 37
```

Step 11: Insert the eleventh integer, 60. Since 60 is greater than 58 and less than 62, it becomes the right child of 58.

Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

A binary search tree is generated by inserting in order of the following integers: 50, 15, 62, 5, 20, 58, 91, 3, 8, 37, 60, 24. The number of nodes in the left subtree and right subtree of the root respectively isa)(4, 7)b)(7,4)c)(8,3)d)(3,8)Correct answer is option 'B'. Can you explain this answer?
Question Description
A binary search tree is generated by inserting in order of the following integers: 50, 15, 62, 5, 20, 58, 91, 3, 8, 37, 60, 24. The number of nodes in the left subtree and right subtree of the root respectively isa)(4, 7)b)(7,4)c)(8,3)d)(3,8)Correct answer is option 'B'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about A binary search tree is generated by inserting in order of the following integers: 50, 15, 62, 5, 20, 58, 91, 3, 8, 37, 60, 24. The number of nodes in the left subtree and right subtree of the root respectively isa)(4, 7)b)(7,4)c)(8,3)d)(3,8)Correct answer is option 'B'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for A binary search tree is generated by inserting in order of the following integers: 50, 15, 62, 5, 20, 58, 91, 3, 8, 37, 60, 24. The number of nodes in the left subtree and right subtree of the root respectively isa)(4, 7)b)(7,4)c)(8,3)d)(3,8)Correct answer is option 'B'. Can you explain this answer?.
Solutions for A binary search tree is generated by inserting in order of the following integers: 50, 15, 62, 5, 20, 58, 91, 3, 8, 37, 60, 24. The number of nodes in the left subtree and right subtree of the root respectively isa)(4, 7)b)(7,4)c)(8,3)d)(3,8)Correct answer is option 'B'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of A binary search tree is generated by inserting in order of the following integers: 50, 15, 62, 5, 20, 58, 91, 3, 8, 37, 60, 24. The number of nodes in the left subtree and right subtree of the root respectively isa)(4, 7)b)(7,4)c)(8,3)d)(3,8)Correct answer is option 'B'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of A binary search tree is generated by inserting in order of the following integers: 50, 15, 62, 5, 20, 58, 91, 3, 8, 37, 60, 24. The number of nodes in the left subtree and right subtree of the root respectively isa)(4, 7)b)(7,4)c)(8,3)d)(3,8)Correct answer is option 'B'. Can you explain this answer?, a detailed solution for A binary search tree is generated by inserting in order of the following integers: 50, 15, 62, 5, 20, 58, 91, 3, 8, 37, 60, 24. The number of nodes in the left subtree and right subtree of the root respectively isa)(4, 7)b)(7,4)c)(8,3)d)(3,8)Correct answer is option 'B'. Can you explain this answer? has been provided alongside types of A binary search tree is generated by inserting in order of the following integers: 50, 15, 62, 5, 20, 58, 91, 3, 8, 37, 60, 24. The number of nodes in the left subtree and right subtree of the root respectively isa)(4, 7)b)(7,4)c)(8,3)d)(3,8)Correct answer is option 'B'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice A binary search tree is generated by inserting in order of the following integers: 50, 15, 62, 5, 20, 58, 91, 3, 8, 37, 60, 24. The number of nodes in the left subtree and right subtree of the root respectively isa)(4, 7)b)(7,4)c)(8,3)d)(3,8)Correct answer is option 'B'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev