Sorting Algorithms - Study Mode
[#251] What is the average number of inversions in an array of N distinct numbers?
Correct Answer
(A) N(N-1)/4
[#252] Cocktail sort uses which of the following methods for sorting the input?
Correct Answer
(D) exchanging
[#253] Which of the following is Python's standard sorting algorithm?
Correct Answer
(D) tim sort
[#254] The given array is arr = {2, 3, 4, 1, 6}. What are the pivots that are returned as a result of subsequent partitioning?
Correct Answer
(A) 1 and 3
[#255] What is the average case running time of an insertion sort algorithm?
Correct Answer
(D) O(N 2 )