Please visit, subscribe and share 10 Minutes Lectures in Computer Science

# Data structures and algorithms multiple choice questions with answers, important interview questions in data structures, data structures questions for entrance exams, frequently asked questions in data structures and algorithms, GATE questions in data structures with explained answers

## SET 10

1. Consider a perfect binary tree of height 5. Which of the following are the minimum and maximum number of nodes in the right sub-tree of the root?

a) 32

b) 31

c) 16

d) 9

2. Rank the following functions by increasing order of growth; (For example, the correct ordering of n2, n4, n, n3 is n, n2, n3, n4.)

 f1 = (n!)1/n f2 = ((n)n)1/2 f3 = log nn f4 = n log n

a) f1, f2, f3, f4

b) f1, f3, f4, f2

c) f1, f2, f4, f3

d) f2, f1, f3, f4

### 3. What is a collision in a hash table implementation of a symbol table? Choose the most appropriate one.

a) Two key-value pairs that have equal keys but different values.

b) Two key-value pairs that have different keys and hash to different indices.

c) Two key-value pairs that have different keys but hash to the same index.

d) Two key-value pairs that have equal keys but hash to different indices.

4. A linear-probing hash table of length 10 uses the hash function h(x) = x mod 10. After inserting six integer keys into an initially empty hash table, the array of keys is:

Which of the following insertion sequences resulting in the above hash table? Assume that the length of the hash table does not change during the insertions.

a) 46, 42, 34, 52, 23, 33

b) 34, 42, 23, 52, 33, 46

c) 46, 34, 42, 23, 52, 33

d) 42, 46, 33, 23, 34, 52

### 5. Which of the following algorithms is parsimonious?

a) Insertion sort

b) Selection sort

c) Heap sort

d) All of the above

*************************

## Featured Content

### Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

data recovery