0
0
Data Structures Theoryknowledge~5 mins

Why BST enables efficient searching in Data Structures Theory - Quick Recap

Choose your learning style9 modes available
Recall & Review
beginner
What does BST stand for in data structures?
BST stands for Binary Search Tree, a tree data structure where each node has at most two children, and the left child's value is less than the parent, while the right child's value is greater.
Click to reveal answer
beginner
How does the BST property help in searching for a value?
Because the left subtree contains smaller values and the right subtree contains larger values, you can decide to go left or right at each node, reducing the search area quickly.
Click to reveal answer
beginner
Why is searching in a BST more efficient than in a linked list?
In a BST, you skip half of the remaining nodes at each step by choosing left or right, while in a linked list you must check nodes one by one.
Click to reveal answer
intermediate
What is the average time complexity of searching in a balanced BST?
The average time complexity is O(log n), meaning the search time grows slowly as the number of nodes increases.
Click to reveal answer
intermediate
What happens to search efficiency if a BST becomes unbalanced?
If the BST becomes unbalanced (like a linked list), search efficiency drops to O(n), meaning you might have to check many nodes one by one.
Click to reveal answer
What property of a BST allows efficient searching?
ANodes are connected in a circle
BLeft child values are smaller, right child values are larger
CAll nodes have the same value
DEach node has three children
What is the average time complexity of searching in a balanced BST?
AO(n)
BO(1)
CO(n^2)
DO(log n)
If a BST is unbalanced and looks like a linked list, what is the search time complexity?
AO(1)
BO(log n)
CO(n)
DO(n log n)
Why is searching in a linked list less efficient than in a BST?
ABecause linked lists require checking nodes one by one
BBecause linked lists have no order
CBecause linked lists have more children per node
DBecause linked lists are always sorted
What does each step in searching a BST do?
AChooses to go left or right based on value comparison
BChecks all nodes at once
CSkips the root node
DDeletes nodes
Explain how the structure of a BST helps make searching faster compared to a simple list.
Think about how you decide which way to go at each node.
You got /3 concepts.
    Describe what happens to search efficiency if a BST becomes unbalanced and why.
    Consider what happens if all nodes are on one side.
    You got /3 concepts.