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

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

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

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

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

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