![](https://sp-ao.shortpixel.ai/client/to_webp,q_glossy,ret_img,w_300,h_117/https://codewindow.in/wp-content/uploads/2021/04/capgemini-logo-2-300x117.png)
a) (a-b)(c/d)
b) (a-(bc))/d
c) a-((bc)/d)
d) (((a-b)c)/d)
Answer: d) (((a-b)*c)/d)
Q2. Find out the array representation of the given max heap, if the value 12 is deleted from it.
18, 15, 12, 9, 6, 3
a) 18, 15, 9, 6, 3
b) 9, 6, 18, 15, 3
c) 18, 3, 6, 9, 15
d) 18, 15, 3, 9, 6
Answer: d) 18, 15, 3, 9, 6
Q3. Find out the array representation of the given min heap, if the value 4 is deleted from it.
2, 4, 6, 8, 10
a) 2, 10, 6, 8
b) 2, 6, 8, 10
c) 6, 10, 8, 2
d) 2, 8, 6, 10
Answer: d) 2, 8, 6, 10
Q4. Which of the following traversal of a binary tree always yields all the nodes?
a) In-order traversal
b) Post-order traversal
c) Pre-order traversal
d) Level order traversal
Answer: All are correct
Q5. Each node in a Doubly Linked List contains how many fields?
a) 1
b) 2
c) 3
4) 4
Answer: c) 3
Explanation: [prev, data, next]
Q6. Linked Lists are used to implement which of the following?
1.Stack
2.Queue
3.Trees
a) 1 and 3
b) 2 and 3
c) 1, 2 and 3
d) 1 and 2
Answer: c) 1, 2 and 3
Q7. If we draw a binary search tree by inserting the given numbers from left to right, then what would be the height of the BST?
150, 250, 350, 140, 120
a) 5
b) 2
c) 4
d) 3
Answer: b) 2
Explanation: The height of a node in a binary search tree is the largest number of edges in a path from a leaf node to a target node.
150
140 250
120 350