Given a serialized representation of a Binary Tree, can we reconstruct the original tree uniquely?
No, never
Only if we have additional information about the tree structure
Yes, always
Only if the tree is a BST
What is the difference between Postorder and Inorder Traversal?
Postorder is used for deleting nodes in a Binary Tree, while Inorder is used for printing the nodes in sorted order.
Postorder visits the left subtree, then the right subtree, and finally the root, while Inorder visits the left subtree, the root, and then the right subtree.
Postorder visits the root node before its children, while Inorder visits the root between its left and right children.
There is no significant difference; both traversals produce the same output.
Which of the following types of binary trees guarantees that all levels except possibly the last are completely filled, and the last level has all keys as left as possible?
Complete Binary Tree
Full Binary Tree
Degenerate Binary Tree
Perfect Binary Tree
What is the time complexity of calculating the height of a binary tree?
O(n)
O(1)
O(log n)
O(n^2)
What is the worst-case time complexity of inserting a node into a Binary Search Tree (BST)?
O(n log n)
What is the time complexity of searching for a specific value in a perfectly balanced BST?
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
Which data structure is most suitable for implementing Level Order Traversal efficiently?
Queue
Binary Heap
Linked List
Stack
Which type of binary tree traversal is typically used to delete all nodes in a BST?
Preorder traversal
Inorder traversal
Postorder traversal
Level-order traversal
How can you identify leaf nodes during a preorder traversal of a binary tree?
A node is a leaf if its value is less than its parent's value.
It is not possible to identify leaf nodes during preorder traversal.
A node is a leaf if it is visited before its children.
A node is a leaf if both its left and right child pointers are NULL.