Recent questions tagged sorting

1 votes
1 answer
181
Sort The Following Sequence of input using Heap sort.{ 10 , 2 , 1 , 5, 3 ,8 ,11,24 ,7 }Please show the output at every pass because i am getting confused.
0 votes
0 answers
182
https://gateoverflow.in/20617/tifr2011-b-311+2(n-2) is correct ???i.e option d looks more correct....??
0 votes
0 answers
183
https://gateoverflow.in/688/gate2000-17there is swap between adjacent element in insertion sort also??
0 votes
1 answer
185
suppose we are given a sorted array ....and we need to extract minimum every tym what is the time complexity??and what is the tym complexity to delete the minimum ? are ...
4 votes
1 answer
186
. In the standard merge sort algorithm on a list of size n, what is the maximum number of times an item can be compared?a)2b)lognc)n-1d)nlogn
0 votes
2 answers
192
Best and Worst case input for:1. Selection Sort2. Insertion Sort3. Merge Sort4. Quick Sort5. Bucket Sort6. Counting Sort7. Bubble Sort
0 votes
1 answer
193
The minimum number of comparisons required to determine if an integer appears more than n/2 times in a sorted array of n integers is(A) (n)(B) (logn)(C) (log*n)(D) (1)
0 votes
1 answer
194
If given numbers are 12,7,15,8,19,20,17,21,5,3 in _______ passes of quick sort element 5 will be in sorted position. (Considering last element as pivot)
0 votes
1 answer
195
worst no. of comparision required for sort n numbers by insertion sort and selection sort if:1. Array is already sorted.2. Array is sorted but in descending order.3. Arra...
0 votes
0 answers
196
1 votes
2 answers
197
Could a binary search tree be built using o(n lg n) comparisons in the comparisonmodel? Explain why or why not.
1 votes
1 answer
199
suppose merge sort takes 2 sec to sort a set of 64 keys then how much time will take to sort a set of 512 keys?here, ans is 24 sec how it is plz explain me.
1 votes
1 answer
200
0 votes
1 answer
202
Insertion sort uses an incremental approach for designing algorithm can someone please explain?
0 votes
1 answer
203
Given 2-sorted arrays each of n-elements and distinct. How much time it will take to find middle element of the union sorted array?a) O(1)b) O(logn)c) O(n)d) None of thes...
0 votes
2 answers
204
The maximum number of swap possible of an unsorted array[1....n] in quicksort is?a) O(n)b) O($n^{2}$)Explain briefly.
0 votes
2 answers
205
Given two sorted arrays each of n elements and distinct .how much time it will take to find the middle element of the union sorted array ?1.O(1)2.O(logn)3.O(n)4.none of t...
0 votes
2 answers
206
The total number of comparions required to merge 4 sorted files containing 15, 3, 9 and 8 records into a single sorted file is A.66 B.39 C.15 D.33
1 votes
1 answer
207
When sorting technique is called stable?
4 votes
7 answers
208
0 votes
3 answers
209
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(A) (B) (C) (D)...
0 votes
1 answer
210
You have to sort 1 GB of data with only 100 MB of available main memory. Which sorting technique will be most appropriate?1)QuickSort2)MergeSort3)HeapSort4)Selection Sort...