A complete binary tree with 'n' nodes has a height of?
n - 1
floor(log2(n))
n/2
log2(n) + 1
Is it possible for a full binary tree to have an even number of nodes?
Yes
No
Level Order Traversal of a Binary Tree is also known as?
Depth First Search (DFS)
Breadth First Search (BFS)
Postorder Traversal
Preorder Traversal
Perfect binary trees are commonly used in which of the following applications due to their balanced structure and efficient space utilization?
Hash Tables
Binary Search Trees
Heap Sort
Trie Data Structures
What is the time complexity of efficiently finding the diameter of a binary tree?
O(log n)
O(n)
O(n^2)
O(n log n)
When deleting a node with two children in a BST, which node is typically chosen as its replacement?
Any leaf node in the subtree rooted at the node being deleted
The leftmost child of the node's right subtree
The node's immediate parent
The rightmost child of the node's left subtree
What is the maximum number of nodes at level 'l' in a binary tree?
2^l
l
2l
l^2
What is the advantage of using a level order serialization for a Binary Tree?
Preserves the level order traversal of the tree
Reduced space complexity
Easier to implement than other serialization methods
More efficient for finding the LCA
What is the primary advantage of using a balanced BST over an unbalanced BST?
Reduced memory usage
Improved worst-case time complexity for search, insertion, and deletion
Guaranteed constant-time search complexity
Faster insertion operations
The diameter of a binary tree is defined as:
The number of nodes in the tree.
The shortest path between the root and any leaf node.
The height of the tree.
The longest path between any two nodes in the tree.