Which of the following is not a stable sorting algorithm in its typical implementation.
Consider a situation where swap operation is very costly. Which of the following sorting algorithms should be preferred so that the number of swap operations are minimized in general?
1 Crore+ students have signed up on EduRev. Have you? Download the App |
In a modified merge sort, the input array is splitted at a position one-third of the length(N) of the array. Which of the following is the tightest upper bound on time complexity of this modified Merge Sort.
You have to sort 1 GB of data with only 100 MB of available main memory. Which sorting technique will be most appropriate?
A list of n string, each of length n, is sorted into lexicographic order using the merge-sort algorithm. The worst case running time of this computation is
Which sorting algorithm will take least time when all elements of input array are identical? Consider typical implementations of sorting algorithms.
Which of the following sorting algorithms has the lowest worst-case complexity?
Assume that a mergesort algorithm in the worst case takes 30 seconds for an input of size 64. Which of the following most closely approximates the maximum input size of a problem that can be solved in 6 minutes?
What is the best sorting algorithm to use for the elements in array are more than 1 million in general?
Given two sorted list of size m and n respectively. The number of comparisons needed the worst case by the merge sort algorithm will be
Of the following sorting algorithms, which has a running time that is least dependent on the initial ordering of the input?
Consider the polynomial p(x) = a0 + a1x + a2x^2 +a3x^3, where ai != 0, for all i. The minimum number of multiplications needed to evaluate p on an input x is:
Consider a situation where you don't have function to calculate power (pow() function in C) and you need to calculate x^n where x can be any number and n is a positive integer. What can be the best possible time complexity of your power function?
Consider the problem of computing min-max in an unsorted array where min and max are minimum and maximum elements of array. Algorithm A1 can compute min-max in a1 comparisons without divide and conquer. Algorithm A2 can compute min-max in a2 comparisons by scanning the array linearly. What could be the relation between a1 and a2 considering the worst case scenarios?
Consider the following array.
Which algorithm out of the following options uses the least number of comparisons (among the array elements) to sort the above array in ascending order?
81 videos|80 docs|33 tests
|
81 videos|80 docs|33 tests
|