## Quiz Questions

Each question has four choices. More than one options can be correct. When you have finished the quiz, click the button at the end of the questions to view the result, and the solutions and answers.

Correct Answers: | |

Wrong Answers: | |

Unattempted: |

### Question 1

Which of these methods are used for resolving collision processing?

**A**

Chaining

**B**

Open addressing

**C**

both A and B

**D**

None of them.

**Soln.**

**Ans: C**

- Chaining
- Open addressing

### Question 2

To Implement _________ Search algorithm, the list should be sorted

**A**

Binary Search

**B**

Both

**C**

Linear Search

**D**

none of them

**Soln.**

**Ans: A**

Binary Search algorithm is based on the preceding approach for searching an item in a sorted list.

### Question 3

Ideally efficiency of hashing is:

**A**

O(1)

**B**

O(n)

**C**

O(n log n)

**D**

O(log n)

**Soln.**

**Ans: A**

Ideally efficiency of hashing is O(1)

### Question 4

Which of the following is not a limitation of the binary search algorithm?

**A**

must use a sorted array

**B**

requirement of sorted array is expensive when a lot of insertion and deletions are needed

**C**

there must be a mechanism to access middle element directly

**D**

binary search algorithm is not efficient when the data elements are more than 1000.

**Soln.**

**Ans: D**

binary search algorithm is not efficient when the data elements are more than 1000.

### Question 5

In binary search algorithm, after every search operation, the search gets reduced by____________?

**A**

1/2

**B**

1/3

**C**

1/4

**D**

1/6

**Soln.**

**Ans: C**

In binary search algorithm, after every search operation, the search gets reduced by 1/4.

### Question 6

In binary search algorithm, after every search operation, the search gets reduced by____________?

**A**

1/2

**B**

1/3

**C**

1/4

**D**

1/6

**Soln.**

**Ans: C**

In binary search algorithm, after every search operation, the search gets reduced by 1/4.

### Question 7

In which of the following hashing method, you first divide the keys into parts and then add them to get the hash value.

**A**

Folding Method

**B**

Truncation Method

**C**

Mid square Method

**D**

Modular Method

**Soln.**

**Ans: A**

In Folding Method first divide the keys into parts and then add them to get the hash value.

### Question 8

Which of the following are examples of binary search?

**A**

Number guessing game

**B**

Word lists

**C**

Applications to complexity theory

**D**

All of them

**Soln.**

**Ans: D**

All are the examples of binary search.

### Question 9

The occurrence of collision can be ______ by using a good hash function.

**A**

Maximized

**B**

Minimized

**C**

Maximized as well as minimized

**D**

none of them.

**Soln.**

**Ans: B**

The occurrence of collision can be

*minimized*by using a good hash function.### Question 10

In Quadratic probing when increasing the distance between the search location which problem is decreased?

**A**

Clustering

**B**

Clubbing

**C**

Clouding

**D**

Computing

**Soln.**

**Ans: A**

In Quadratic probing when increasing the distance between the search location decreases the problem of clustering.

## My C/C++ Videos on Youtube

Here is the complete playlist for video lectures and tutorials for the absolute beginners. The language has been kept simple so that anybody can easily understand them. I have avoided complex jargon in these videos.