DS | GATE-2009 | PREVIOUS YEAR QUESTIONS| SET-12

Set-13 DS GATE-2008

DS | GATE-2009 | Data Structures

  1. The keys 12, 18, 13, 2, 3, 23, 5 and 15 are inserted into an initially empty hash table of length 10 using open addressing with hash function h(k) = k mod 10 and linear probing. What is the resultant hash table? [GATE – 2009]

a.

0 
1 
22
323
4 
515
6 
7 
818
9 

b.

0 
1 
212
313
4 
55
6 
7 
818
9 

c.

0 
1 
212
313
42
53
623
75
818
915

d.

0 
1 
212,2
313,3,23
4 
55,15
6 
7 
818
9 

Answer : c)
DS | GATE-2009 |


  1. What is the maximum height of any AVL-tree with 7 nodes? Assume that the height of a tree with a single node is 0. [GATE – 2009]

a. 2
b. 3
c. 4
d. 5

Answer : b)


  1. Consider a binary max-heap implemented using an array. Which one of the following array represents a binary max-heap? [GATE – 2009]

a. {25,12,16,13,10,8,14}
b. {25,14,13,16,10,8,12}
c. {25,14,12,13,10,8,16}
d. {25,14,16,13,10,8,12}

Answer : d)
DS | GATE-2009 |


  1. Consider a binary max-heap implemented using an array. What is the content of the array after two delete operations on the correct answer to the previous question?   [GATE – 2009]

a. {14,13,12,10,8}
b. {14,12,13,8,10}
c. {14,13,12,8,10}
d. {14,13,8,12,10}

Answer : c)


Back to GATE-HOME


Spread the love

Leave a Comment

Your email address will not be published. Required fields are marked *