0 votes 0 votes closed as a duplicate of: Self doubt You are asked to sort 15 randomly generated numbers. One should prefer - 1. Bubble Sort 2. Quick Sort 3. Merge Sort 4. Heap Sort Please explain why others 3 sorting algorithms except the answer can't be used ? Algorithms sorting algorithms time-complexity heap-sort merge-sort + – Rahul Ranjan 1 asked Jun 15, 2018 • closed Jun 15, 2018 by Rahul Ranjan 1 Rahul Ranjan 1 677 views comment Share Follow See 1 comment See all 1 1 comment reply pradeepchaudhary commented Jul 8, 2018 reply Follow Share We can Use Any Of the 4 algorithms , Since they are Meant For Sorting of Element. But When It Comes To efficient Algorithm, the Algorithms other Then Bubble Sort Are Equally Effiecient In terms of Time Complexity (For QuickSort I suppose Normal Implementation : last element as Pivot) , Quick Sort Is More Effiecient for Less Number of Elements, Since it is Inplace. Good Cache Locality of QuickSort Making it Faster in Virtual Memory Environment. And We prefer Merge Sort For Large Data Structures, and Disk Access like Stuff. I will Go with QuickSort.(considering Random Input) 1 votes 1 votes Please log in or register to add a comment.