Sorting
closed

closed by
1,532 views
2 votes
2 votes
closed with the note: Got it

closed by

1 Answer

Best answer
0 votes
0 votes

P is False because of the number of leaves of a decision tree which sort $5$ numbers is $5!$ and the height of a tree is atleast  $log(5!)$. We need atleast $7$ comparisons. 

Q is False because of auxiliary sorting routine in radix sort needs to be stable, meaning that numbers with the same value appear in the output array in the same order as they do appear in the input array. Heapsort is not stable. It does operate in place, meaning that only a constant number of elements of the input array are ever stored outside the array

selected by

Related questions

0 votes
0 votes
2 answers
1
reena_kandari asked Jan 10, 2017
543 views
0 votes
0 votes
1 answer
2
pradeepchaudhary asked Jul 8, 2018
3,309 views
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...
0 votes
0 votes
0 answers
3
Rahul Ranjan 1 asked Jun 15, 2018
673 views
You are asked to sort 15 randomly generated numbers. One should prefer - 1. Bubble Sort2. Quick Sort3. Merge Sort4. Heap Sort Please explain why others 3 sorting algorith...
1 votes
1 votes
2 answers
4
Pradeep Verma asked Jul 7, 2018
511 views