Post-Quiz - AA Attempt Review
Post-Quiz - AA Attempt Review
Question You have to sort a list 'L' which consists of some sorted elements and few “random” elements. Which of the following sorting methods
1 would be especially suitable for such a task?
Correct
Quick sort
Bubble sort
Insertion sort
Question What is the time complexity for executing merge sort on an array of size n which is already sorted is
2
Correct
Select one:
Mark 1.00 out of
1.00 O(n^2)
O(log n)
O(n log n)
O(n)
procedure bubbleSort(A,n)
for i = 0 to n-1
for j = 0 to n-i-1
end bubbleSort
Question
4 If the given array is {6,2, 5, 1, 9 }, the 3rd number from the left while doing bubble sort in the 2nd iteration is 5 .
Correct
Question Time complexities of three algorithms are given. Which should execute the slowest for large values of N?
5
Correct
Select one:
Mark 1.00 out of
1.00 O(2N)
O(log N)
O(N)
O(n^2)