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

What is the best definition of a collision in a hash table?

**A**

Two entries are identical except for their keys.

**B**

Two entries with different data have the exact same key.

**C**

Two entries with different keys have the same exact hash value.

**D**

Two entries with the exact same key have different hash values.

**Soln.**

**Ans: C**

The situation in which hash function generates the same hash value for two or more keys is called collision.

### Question 2

What is the best case performance of bubble sort algorithm?

**A**

O(n

^{2})**B**

O(2

^{n})**C**

O(n)

**D**

O(n log n)

**Soln.**

**Ans: C**

### Question 3

Which of these is not used for resolving collision.

**A**

Coalesced Chaining

**B**

Separate Chaining

**C**

Similar Chaining

**D**

A and B both are chaining technique

**Soln.**

**Ans: C**

Similar chaining is not chaining technique used for resolving collision.

### Question 4

Bubble sort and selection sort have same order of growth

**A**

True

**B**

False

**C**

Depends on list

**D**

None

**Soln.**

**Ans: A**

### Question 5

How many comparisons are performed in the second pass of the selection sort algorithm?

**A**

n - 1

**B**

n - 2

**C**

n

**D**

None of the above

**Soln.**

**Ans: B**

### Question 6

The process of traversing the entire list once is called a

**A**

Pass

**B**

List

**C**

Both

**D**

None

**Soln.**

**Ans: A**

Pass

### Question 7

The operation of scanning an element in a list is known as

**A**

Sorting

**B**

Merging

**C**

Inserting

**D**

Traversal

**Soln.**

**Ans: D**

Scanning or traversal is moving from an item to item in a list.

### Question 8

The worst case efficiency of hash function is:

**A**

O(1)

**B**

O(n)

**C**

O(log n)

**D**

O(n log n)

**Soln.**

**Ans: B**

The worst case efficiency of hash function when poor hash function is used is O(n).

### Question 9

What is the average case performance of binary search?

**A**

O(n log n)

**B**

O(log n)

**C**

O(1)

**D**

O(n)

**Soln.**

**Ans: B**

The average case performance of binary search is O(log n).

### Question 10

What is the worst case space complexity of bubble sort algorithm?

**A**

O(n

^{2})**B**

O(2

^{n})**C**

O(n)

**D**

O(1)

**Soln.**

**Ans: D**

O(1) Auxiliary

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