GATE 2007 Computer Science and Information Technology (CS) Questions with Solutions

GATE 2007

184 questions

MCQ 1841-mark 184

Questions 86–90 of 184

Q86Heap Tree1 markMCQ−0.33 if wrong
Consider the process of inserting an element into a Max Heap, where the Max Heap is represented by an array. Suppose we perform a binary search on the path from the new leaf to the root to find the position for the newly inserted element, the number of comparisons performed is:

Q87B plus Tree1 markMCQ−0.33 if wrong
Consider the B+B^{+} tree in the adjoining figure, where each node has at most two keys and three links.
K40 K30 K50 K10 K20 K30 K40 K50
Keys K15 and then K25 are inserted into this tree in that order. Now the key K50 is deleted from the B+B^{+} tree resulting after the two insertions made earlier. Consider the following statements about the B+B^{+} tree resulting after this deletion.
i. The height of the tree remains the same.
ii. The node
K20
(disregarding the links) is present in the tree.
iii. The root node remains unchanged (disregarding the links).
Which one of the following options is true ?

Q88B plus Tree1 markMCQ−0.33 if wrong
Consider the B+B^+ tree in the adjoining figure, where each node has at most two keys and three links.

K40 K30 K50 K10 K20 K30 K40 K50
Keys K15 and then K25 are inserted into this tree in that order. Exactly how many of the following nodes (disregarding the links) will be present in the tree after the two insertions?
K30 K50 K25 K30 K20 K25 K15 K20

Q89Hashing1 markMCQ−0.33 if wrong
Consider a hash function that distributes keys uniformly. The hash table size is 20. After hashing of how many keys will the probability that any new key hashed collides with an existing one exceed 0.5.

Q90Hashing1 markMCQ−0.33 if wrong
Consider a hash table of size seven, with starting index zero, and a hash function (3x + 4)mod7. Assuming the hash table is initially empty, which of the following is the contents of the table when the sequence 1, 3, 8, 10 is inserted into the table using closed hashing? Note that '-' denotes an empty location in the table.