C

Topic: Structures and union

Which is the best sorting method?

There is no sorting method that is universally superior to all others. The programmer must carefully examine the problem and the desired results before deciding the particular sorting method. Some of the sorting methods are given below:Bubble sort : When a file containing records is to be sorted then Bubble sort is the best sorting method when sorting by address is used.Bsort : It can be recommended if the input to the file is known to be nearly sorted.Meansort : It can be recommended only for input known to be very nearly sorted.Quick Sort : In the virtual memory environment, where pages of data are constantly being swapped back and forth between external and internal storage. In practical situations, quick sort is often the fastest available because of its low overhead and its average behavior.Heap sort : Generally used for sorting of complete binary tree. Simple insertion sort and straight selection sort : Both are more efficient than bubble sort. Selection sort is recommended for small files when records are large and for reverse situation insertion sort is recommended. The heap sort and quick sort are both more efficient than insertion or selection for large number of data.Shell sort : It is recommended for moderately sized files of several hundred elements.Radix sort : It is reasonably efficient if the number of digits in the keys is not too large.

Browse random answers:

What is a priority queue?
How to build an expression trees ?
How to convert Stack in to Queue and v varsa c with data structure.?
How do display the list in single linked list form last to first?
What is the easiest sorting method to use? 
What is the quickest sorting method to use? 
What is the quickest searching method to use? 
What is the difference between structure and union?
Can we initialize unions?
Why can’t we compare structures?
How are structure passing and returning implemented?
What is a structure?
What are the differences between structures and union?
What is a union?
What the advantages of using Unions?
which one is better structure or union?(other than the space occupied )
How will you free the allocated memory?
What is the difference between UNION and UNION ALL?
Describe structures and Union in brief.
What are the properties of Union? 
What the advantages of using Unions?
Difference between structure and union?
What is a structure and a union in C?
 What are bit fields? What is the use of bit fields in a Structure declaration?
Explain with an example the self-referential structure.
what is the similarity between a Structure, Union and enumeration?
What are bit fields? What is the use of bit fields in a Structure declaration?
What the advantages of using Unions?
How can we read/write Structures from/to data files?
"union" Data Type What is the output of the following program? Why?
Which is the best sorting method?
What's the difference between these two declarations?