1.A collision in hash function means

 Ans:  A). Two keys match to same slot

2.In chaining, we put all those elements into same linked list which

Ans: B). Hash to same slots

3.For a hash table T with n slots and m elements, load factor for T is defined by:

Ans:B). m/n

4.The hash function to map a key k into one of the m slots using division method is given by:

Ans:  B). h(k) = k mod m

5. For a given ordinary hash function h’ : U –> {0,1,2,…,m-1} the method of linear probing uses the hash function:

Ans: A). h(k,i) = (h'(k) + i) mod m  , for i= 0,1,2,...,m-1

6.Let k be a node in a binary search tree. Let x be a node in right sub-tree of k and y be a node in the left sub-tree of k then

Ans: B). y.key <= x.key

7.The worst case time complexity of insert operations in a Binary Search Tree containing n nodes is:

Ans: C). O(n)

8.The worst case time complexity of search operation in a Binary Search Tree containing n nodes is:

Ans:  B). O(n)

9.Given the following input (4322, 1334, 1471, 9679, 1989, 6171, 6173, 4199) and the hash function: h(x)=x mod 10, which of the following statements are true?
9679, 1989, 4199 hash to the same value
1471, 6171 has to the same value
All elements hash to the same value
Each element hashes to a different value

Ans: C). 1 and 2 both

10.The following numbers are inserted into an empty binary search tree in the given order: 10, 1, 3, 5, 15, 12, 16. At which level would 5 be inserted? Assume that root has level 1.

Ans:D). none of the above

Stay Hackademic , Be Hackademic(Subcribe Hackademic)

 

Categories: NPTEL solution

7 Comments

Sagar · September 5, 2017 at 5:48 AM

Bro please upload solution for 5th Assignment … For IMAD

    Mit Patel · September 5, 2017 at 7:12 PM

    The solution has been posted. Keep visiting hackademic. Thank you.
    ~ Because here we aim to please

ABHISHEK · September 5, 2017 at 6:18 AM

please send the solution for IMAD week 5 mcq’s…
last date is 6th september 2017

    Mit Patel · September 5, 2017 at 7:11 PM

    The solution has been posted. Keep visiting hackademic. Thank you.
    ~ Because here we aim to please

raju · September 7, 2017 at 3:47 PM

week 6 solutions please sir!!

Rishab · September 10, 2017 at 2:17 PM

Week 6 please tomorrow is the last date

raju · September 11, 2017 at 2:34 PM

sir week 6 assignment????

Leave a Reply

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