0% found this document useful (0 votes)
211 views2 pages

Quiz DS 01

The document contains 10 multiple choice questions about sorting algorithms and algorithm analysis. It asks about bubble sort, insertion sort, selection sort, merge sort, binary search, big theta notation, and time complexities. The questions cover topics like the methodology of different sorting algorithms, their time complexities in average, worst and best cases, and real world examples of sorting algorithms.

Uploaded by

Viraj Bhosale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
211 views2 pages

Quiz DS 01

The document contains 10 multiple choice questions about sorting algorithms and algorithm analysis. It asks about bubble sort, insertion sort, selection sort, merge sort, binary search, big theta notation, and time complexities. The questions cover topics like the methodology of different sorting algorithms, their time complexities in average, worst and best cases, and real world examples of sorting algorithms.

Uploaded by

Viraj Bhosale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

1.

In_____ sort largest element gets bouble out and then 2nd largest element gets
bouble out to get ascending ordered sorted list of elements.
Answers
1. Insertion Sort
2. Selection Sort
3. Bubble Sort
4. None of the above
ans.3

2. Big Theta (Θ)


Answers
1. When an algorithm has a complexity with lower bound = upper bound
2. Describes the lower bound of a asymptotic function
3. Describes the worst-case of an algorithm
4. None of the above
ans.1

3. Which is not true about selection sort?


Answers
1. uses in-place algorithm at no extra cost of memory
2. maintains two partitions left for sorted and right for unsorted elements
3. both of the above
4. It uses divide and conquer approach
ans.4

4. The top-down merge sort approach is the methodology which uses ----------- .
Answers
1. LILO
2. FIFO
3. Iteration
4. Recursion
ans.4

5. Consider the array A[]= {6,4,8,1,3} apply the insertion sort to sort the array .
Consider the cost associated with each sort is 25 rupees , what is the total cost
of the insertion sort when element 1 reaches the first position of the array?
Answers
1. 75
2. 50
3. 25
4. 100
ans.2

6. The algorithm which repeatedly breaks down a list into several sublists until
each sublist consists of a single element.
Answers
1. Selection Sort
2. Merge Sort
3. Bubble Sort
4. Heap Sort
ans.2

7. _____ algorithm follows divide and conquer strategy.


Answers
1. Merge sort
2. Insertion sort
3. Bubble sort
4. All of the above
ans.1

8. What is time complexity of Binary search?


Answers
1. O(n log(n))
2. O(n n!)
3. Ω(n)
4. O(n)
ans.1

9. ---------- can be visualised when people in a queue wanting to be standing in a


height wise sorted manner swap their positions among themselves until everyone is
standing based on increasing order of heights.
Answers
1. Bubble sort
2. Selection Sort
3. Heap Sort
4. Merge Sort
ans.1

10. What is the average case time complexity of selectoin sort?


Answers
1. O(n n!)
2. O(n log(n))
3. Ω(n)
4. O(n^2)
ans.4

You might also like