Search results for sorting

35 votes
6 answers
2
For merging two sorted lists of sizes $m$ and $n$ into a sorted list of size $m+n$, we require comparisons of$O(m)$$O(n)$$O(m+n)$$O(\log m + \log n)$
19 votes
8 answers
3
44 votes
4 answers
4
113 votes
9 answers
5
The number of elements that can be sorted in $\Theta(\log n)$ time using heap sort is$\Theta(1)$$\Theta(\sqrt{\log} n)$$\Theta(\frac{\log n}{\log \log n})$$\Theta(\log n)...
77 votes
5 answers
6
The tightest lower bound on the number of comparisons, in the worst case, for comparison-based sorting is of the order of$n$$n^2$$n \log n$$n \log^2n$
72 votes
14 answers
7
A list of $n$ strings, each of length $n$, is sorted into lexicographic order using the merge-sort algorithm. The worst case running time of this computation is$O (n \log...
61 votes
10 answers
8
66 votes
7 answers
11
If we use Radix Sort to sort $n$ integers in the range $\left (n^{k/2}, n^k \right ]$, for some $k 0$ which is independent of $n$, the time taken would be?$\Theta(n)$$\T...
2 votes
4 answers
12
The running time of Quick sort algorithm depends heavily on the selection of:No. of inputsArrangement of elements in an arraySize of elementsPivot Element
39 votes
4 answers
15
Which one of the following in place sorting algorithms needs the minimum number of swaps?Quick sortInsertion sortSelection sortHeap sort
30 votes
2 answers
17
What is the number of swaps required to sort $n$ elements using selection sort, in the worst case?$\Theta(n)$$\Theta(n \log n)$$\Theta(n^2)$$\Theta(n^2 \log n)$
59 votes
5 answers
18