Tuesday 1 April 2014

SORTING!!!!

This post will be in regards to the sorting algorithms. For the most part, the sorting algorithms are relatively easy to comprehend. The bubble sort, insertion sort, and selection sort, are all sorting algorithms that were covered in CSC 108, they are simple and effective methods at getting the sorting job done without much thought. These are obviously not the only sorting methods out there. The new ones that were introduced consist of shell sort, merge sort and quick sort. The shell sort is by far the most confusing, i have little to no understanding on the way it works, and ive been trying to wrap my head around it, i am probably going to just try staring at it and doing examples on my own of it until i get the understanding on it. Its use of some gap system to make incomplete sorted lists that slowly make it better is just confusing and seems horribly inefficient. The merge sort is pretty interesting within itself, it was a bit confusing at first but when you see it drawn out and shown graphically the understanding is much easier. Basically it makes sense that if you keep splitting things up until they are in pairs and you sort all the pairs then go up until you end up with the final sorted list just seems logical. And finally there is the quick sort. The quick sort was also very confusing and frustrating to understand, however after going over it a few times and really drawing it out i came to understand how it works. The use of a pivot point to create two sorted lists of values greater than the pivot and lesser than the pivot, then sorting those both seems to be pretty fast and more efficient than the merge sort in terms of divide and conquer strategies. In sum, with the sorting algorithms for the most part were fairly easy to grasp, and my difficulties lie with the quick and shell sort, ive been trying to understand them better but im still working on it, either way i will continue just practising both sorting methods till my understanding is more concrete.

No comments:

Post a Comment