You are on page 1of 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