Sunday, September 12, 2021

Multiple choice questions MCQ in Data structures and algorithms with answers set 11

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 11

1. Consider a situation where the data to be sorted is too big to fit in memory, so most of it is on disk. Which of the following is the best algorithm to sort such data?

a) Insertion sort

b) Heap sort

c) Merge sort

d) All of the above

Click here to view answer and explanation

 

2. Consider a large data set, where all the data has only one of about 10 values for sorting purposes (e.g., the data is records of employees of an organization where the legal age range is 25 to 60 and the sort is by age in years). Which of the following is the best algorithm to sort such data?

a) Insertion sort

b) Bucket sort

c) Merge sort

d) Heap sort

Click here to view answer and explanation

 

3. Given a dataset, we would like to sort the first k smallest (k is much smaller than the size of the dataset) in ascending order. Which of the following is the best algorithm to sort such data?

a) Insertion sort

b) Selection sort

c) Merge sort

d) Bucket sort

Click here to view answer and explanation

 

4. If h is any hashing function chosen from universal collection of hash functions and is used to hash n keys in to a table of size m, where n<=m, the expected number of collisions involving a particular key x is

a) <m

b) <n

c) < half of n

d) <1

Click here to view answer and explanation

 

5. Which among the following is a technique of direct search?

a) Binary search

b) Linear search

c) Hash search

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

Why merge sort is well suited for out of main memory data

Practice questions in data structures

Data structures and algorithms GATE exam questions 

Merge sort is good for sorting the data in secondary storage

Which sorting algorithm is good at sorting first k smallest elements ?

What is universal collection of hash functions?

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