Recent questions tagged sorting

1 votes
1 answer
122
The average no. of comparisons performed by the merge sort algorithm, in merging 2 sorted lists of length 2 is___________.Ans: $\frac{8}{3}$
0 votes
1 answer
123
When relative ordering of equal keys is preserved after sorting then it is called stable. Quick sort and heap sort is not a stable sorting algorithm . Doubt -IS Select...
0 votes
2 answers
126
0 votes
0 answers
127
Can anyone help me to understand this problem….??
0 votes
1 answer
128
Which one of the following algorithms cannot sort $n$ numbers in $O(n)$ comparisons?Counting sortRadix sortHeap sortBucket sort
0 votes
1 answer
129
Which of the following is not a stable sorting algorithm in its typical implementation?Merge sortBubble sortQuick sortInsertion sort
0 votes
0 answers
130
The second smallest of $n$ elements can be found with ____ comparisons in the worst case.$n-1$$\lg \: n$$n + ceil(\lg \: n)-2$$\frac{3n}{2}$
2 votes
4 answers
136
Suppose there are 4 sorted list of 16 elements each. If we merge these lists into a single sorted list of 64 elements. The key comparisons that are needed in the worst ca...
0 votes
0 answers
137
2 votes
1 answer
138
0 votes
1 answer
139
Which of the following input will give best case time for selection sort?(A) 1 2 3 4 5 6 7 8 9 10(B) 2 3 1 5 9 7 8 6 10(C) 10 9 8 7 6 5 4 3 2 1 (D) All of above take same...
0 votes
0 answers
142
explain how to solve the above question !
1 votes
1 answer
144
______ sorting algorithms has the lowest worst-case complexity.Selection SortBubble SortMerge SortQuick Sort
1 votes
2 answers
146
0 votes
1 answer
147
Please explain me the difference between the following questions and their answers. All seems similar to me with different answers.https://gateoverflow.in/2048/gate2014-3...
0 votes
0 answers
148
What will be the answer of this question?
0 votes
0 answers
149
0 votes
1 answer
150
no of comparisons in merge sort max?how many max no swaps??[if inplace algo]