Saturday, March 27, 2021

Multiple choice questions in Data structures and algorithms with answers set 10

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


Data Structures and Algorithms Multiple Choice Questions

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

Click here to view answer and explanation


 

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

Click here to view answer and explanation


 

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.

 

Click here to view answer and explanation


 

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

Click here to view answer and explanation


 

5. Which of the following algorithms is parsimonious?

a) Insertion sort

b) Selection sort

c) Heap sort

d) All of the above

Click here to view answer and explanation


 

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

Interview questions and answers in data structure and algorithms

DSA quiz questions with answers explained

Solved true or false questions in DSA

Practice questions in data structures

Data structures and algorithms GATE exam questions 

Why insertion sort is a parsimonious algorithm?

What is parsimonious sorting algorithm?

What is the time complexity of converting min heap into a max heap?

No comments:

Post a Comment

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...

All time most popular contents

data recovery