DataStructure Sorting techniques

 Rehman . · March 31, 2015 Can anybody suggest me material on "Sorting" which i can study from basis to skilled, and how much time is required to grasp the concepts ? if i give 2 complete days will it be enough ? i guess there are 3 types of sorting only (insertion/selection/bubble)

Replies

 Dol Lod · March 31, 2015 There are multiple sorting techniques, many more than what you described. Here are the ones I know with a small description:1)Bubble Sort: specfic implementation of h-sort n^22) H-Sort: uses shrinking radius comparisons to compare between elements until the elements you are comparing are only one apart. This description is terrible, but you essentially do comparisons between items i and i+h and then in the next round you reduce h until you are done. n^1.53) Selection Sort: This focuses on putting the smallest items in the front.  n^24) Insertion Sort : This means everything is properly sorted as you go through it. n^25) Quicksort: This uses a member of the collection to act as a separator and is nlogn.6) Merge Sort: This splits arrays up by half every time. The two halves are then sorted and then recombined in order. nlogn7) Tim sort: nlogn. Read wikipedia article: I feel like I don't understand enough of this particular sort to explain it very well.If it helps I do have source code in C implementing most of these sorts. I ignored 1)h-sort and 2-Tim-sort.
• 1

Suggestions

118,047 followers