CSE - Practice Test -15 | MyPerfectise Solutions

CoderIndeed
0
1) Suppose you are given a binary tree with n nodes, such that each node has exactly either zero or two children. The maximum height of the tree will be
Ans: (n-1) / 2

2) What is the time complexity of searching for an element in a circular linked list?
Ans: O(n)

3) Which of the following traversal outputs the data in sorted order in a BST?
Ans: Inorder

4) Which of the following sorting algorithms can be used to sort a random linked list with minimum time complexity?

Ans: Merge sort

5) The number of structurally different possible binary trees with 4 nodes is
Ans: 14

6) Which of the following pairs of traversals is not sufficient to build a binary tree from the given traversals?
Ans:   Preorder and postorder

7) B+ trees are preferred to binary trees in databases because
Ans: Disk access is much slower than memory access

8) What does the following function do for a given Linked List with first node as head?
void XYZ(struct node* head)
{
if(head == NULL)
return;
XYZ(head->next);
printf("%d ", head->data);
}
Ans: Prints all nodes of linked list in reverse order(code-box)


9) The maximum number of binary trees that can be formed with three unlabeled nodes is:
Ans: 5

10) Which of the following points is/are true about Linked List data structure when it is compared with array?
Ans: All of the above

11) Consider a node X in a Binary Tree. Given that X has two children, let Y be Inorder successor of X. Which of the following is true about Y?
Ans: Y has no left child

12) Which of these is an application of linked lists?
Ans:   All of the mentioned

13) What are the worst-case complexities of insertion and deletion of a key in a binary search tree?
Ans: O(n) both insertion and deletion

14) The height of a binary tree is the maximum number of edges in any root to leaf path. The maximum number of nodes in a binary tree of height x is:
Ans: 2^(x+1)-1

15) 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
Ans: 67

(getCard) #type=(custom) #title=(CSE PlaceMe Answer Key) #info=(All Levels) #button=(View) #icon=(folder_open)

Post a Comment

0Comments

Post a Comment (0)

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Check Now
Accept !