Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  While inserting the elements 71, 65, 84, 69, ... Start Learning for Free
While inserting the elements 71, 65, 84, 69, 67, 83 in an empty binary search tree (BST) in the sequence shown, the element in the lowest level is
  • a)
    65
  • b)
    67
  • c)
    69
  • d)
    83
Correct answer is option 'B'. Can you explain this answer?
Verified Answer
While inserting the elements 71, 65, 84, 69, 67, 83 in an empty binary...
Here is The Insertion Algorithm For a Binary Search Tree :
Insert(Root,key)
{
       if(Root is NULL)
           Create a Node with value as key and return
       Else if(Root.key <= key)                                     Insert(Root.left,key)
       Else
                Insert(Root.right,key)
}
Creating the BST one by one using the above algorithm in the below given image :
View all questions of this test
Most Upvoted Answer
While inserting the elements 71, 65, 84, 69, 67, 83 in an empty binary...
Explanation:

To understand why the element in the lowest level of the binary search tree (BST) is 67, we need to understand how the elements are inserted in a BST.

Binary Search Tree:
A binary search tree is a binary tree in which each node has a key greater than all the keys in its left subtree and smaller than all the keys in its right subtree. This property allows for efficient searching, insertion, and deletion operations.

Insertion in Binary Search Tree:
To insert an element in a binary search tree, we compare the key of the element with the key of the current node. If the key is smaller, we go to the left subtree; if the key is greater, we go to the right subtree. We continue this process until we find an empty location where the new element can be inserted.

Given Sequence:
The elements 71, 65, 84, 69, 67, 83 are inserted in an empty binary search tree in the given sequence.

Step 1: Insert 71
- Since the tree is empty, 71 becomes the root of the tree.

Step 2: Insert 65
- Compare 65 with the root (71).
- 65 is smaller than 71, so we go to the left subtree.
- Since the left subtree is empty, 65 becomes the left child of the root.

Step 3: Insert 84
- Compare 84 with the root (71).
- 84 is greater than 71, so we go to the right subtree.
- Since the right subtree is empty, 84 becomes the right child of the root.

Step 4: Insert 69
- Compare 69 with the root (71).
- 69 is smaller than 71, so we go to the left subtree.
- Compare 69 with the left child (65).
- 69 is greater than 65, so we go to the right subtree.
- Since the right subtree is empty, 69 becomes the right child of 65.

Step 5: Insert 67
- Compare 67 with the root (71).
- 67 is smaller than 71, so we go to the left subtree.
- Compare 67 with the left child (65).
- 67 is greater than 65, so we go to the right subtree.
- Compare 67 with the right child (69).
- 67 is smaller than 69, so we go to the left subtree.
- Since the left subtree is empty, 67 becomes the left child of 69.

Step 6: Insert 83
- Compare 83 with the root (71).
- 83 is greater than 71, so we go to the right subtree.
- Compare 83 with the right child (84).
- 83 is smaller than 84, so we go to the left subtree.
- Since the left subtree is empty, 83 becomes the left child of 84.

Final Binary Search Tree:
```
71
/ \
65 84
\ /
69 83
\
67
```

Element in the Lowest Level:
The lowest level of a
Explore Courses for Computer Science Engineering (CSE) exam
Question Description
While inserting the elements 71, 65, 84, 69, 67, 83 in an empty binary search tree (BST) in the sequence shown, the element in the lowest level isa)65b)67c)69d)83Correct answer is option 'B'. Can you explain this answer? for Computer Science Engineering (CSE) 2025 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 While inserting the elements 71, 65, 84, 69, 67, 83 in an empty binary search tree (BST) in the sequence shown, the element in the lowest level isa)65b)67c)69d)83Correct answer is option 'B'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2025 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for While inserting the elements 71, 65, 84, 69, 67, 83 in an empty binary search tree (BST) in the sequence shown, the element in the lowest level isa)65b)67c)69d)83Correct answer is option 'B'. Can you explain this answer?.
Solutions for While inserting the elements 71, 65, 84, 69, 67, 83 in an empty binary search tree (BST) in the sequence shown, the element in the lowest level isa)65b)67c)69d)83Correct 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 While inserting the elements 71, 65, 84, 69, 67, 83 in an empty binary search tree (BST) in the sequence shown, the element in the lowest level isa)65b)67c)69d)83Correct answer is option 'B'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of While inserting the elements 71, 65, 84, 69, 67, 83 in an empty binary search tree (BST) in the sequence shown, the element in the lowest level isa)65b)67c)69d)83Correct answer is option 'B'. Can you explain this answer?, a detailed solution for While inserting the elements 71, 65, 84, 69, 67, 83 in an empty binary search tree (BST) in the sequence shown, the element in the lowest level isa)65b)67c)69d)83Correct answer is option 'B'. Can you explain this answer? has been provided alongside types of While inserting the elements 71, 65, 84, 69, 67, 83 in an empty binary search tree (BST) in the sequence shown, the element in the lowest level isa)65b)67c)69d)83Correct answer is option 'B'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice While inserting the elements 71, 65, 84, 69, 67, 83 in an empty binary search tree (BST) in the sequence shown, the element in the lowest level isa)65b)67c)69d)83Correct 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
Signup to solve all Doubts
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev