Friday, April 4, 2014

CSC 148: The end

Throughout this semester, I feel as if I have truly strengthened my programming skills and overall computing skills. Even though I could not document each and every detail of this course onto my slog ( blame my terrible, terrible memory), I still feel like this blog helped alot, it jogged my memory whenever I would write and really motivated me to look through all my course notes that I would take during lecture. It has been a pleasure taking CSC 148, and I hope to continue my minor degree in Computer Science next year!

Sorting and Efficiency

Last week in class we learnt about various sorting techniques. For example, quick sort is a sorting technique with log2n, you would choose a pivot ( you could pick a pivot at random), N steps each time so, 0(n)log(n). However, quick sort is slower when the list is already sorted, if its either ascending or descending, which is one of the major problems with quick sort. Another sorting technique would include Merge Sort, which essentially splits a list in half and merges the sort, it keeps splitting until you have one and one. There is also another form of sorting algorithms called Radix Sort, it is used when you have a limited range of data and that your values are integers. This sorting mechanism is alot more efficient than Count Sort, however, it is alot more complex than all the other sorting algorithms.

Recursion

The topic of recursion is a very broad topic, it is the process of repeating items in a self-similar fashion. It can be viewed as an "infinite loop". In computer science, it is referred to a method of defining functions in which the function defined is applied within its own definition. That means that it defines an infinite number of solutions for your code! It uses a finite expression that sometimes refers to other instances, but there is no way a infinite chain can occur in your code. Recursion is more like a process of repeating objects over and over again. It is very useful when dealing with a code that contains numerous amounts of data, such as Binary Search Trees.