F
Which one of the following is a valid sequence of elements in an array representing 3-ary max heap?
2. DFS technique uses queue to find DFT (depth first traversal)
3. BFS technique uses stack to find BFT (breadth first traversal)
4. DFS technique uses stack to find DFT (depth first traversal)
Select correct ones
Note: Adjacency list data structure is used while implementing DFS and BFS
Given two vertices in a graph s and t, which of the two traversals (BFS and DFS) can be used to find if there is path from s to t?
i. 679, 989, 199 hash to the same value
ii. 471, 171 has to the same value
iii. All elements hash to the same value
iv. Each element hashes to a different value
We want to convert this BST into a balanced tree, whose balance factor () ranges from -1≤α≤1. Having these assumptions what will be the balance factor of the node 34 at initial step? If the tree is imbalance then which kind of imbalance is present in the tree?
Note: Consider height of child is 1.
Preorder: 67, 60, 55, 48, 58, 64, 80, 74, 84, 88, 90
What will be the post-order traversal of the above BST?
1, 2, 13, 14, 15, 16, 17, 18
and preorder traversal as:
15, 13, 1, 2, 14, 17, 16, 18
Which among the following is the correct BST for above traversals:
If we randomly search one of the keys present in the above BST, what would be the expected number of comparisons?