Code Complexity

Code complexity is a subject that is taught early on in Computer Science curricula. Not sure if early is the reason why many software developers tend to forget what it is and how to apply it.

Last week a group of developers were talking about the complexity of algorithms and Big O Notation came up. As a matter of fact when considering complexity there are:

Theta notation
Big O notation
Omega notation

Continue reading “Code Complexity”

Sort Times – Part I

sort_comparisonIn the past few weeks I have been reading and experimenting with code and exercises found in the Algorithms fourth edition book by Robert Sedgewick and Kevin Wayne. It is always a good idea for any professional in any field to refresh concepts and learn new things. In my case I am a Senior System Architect for a company in the West Coast so I constantly polish my skills in Computer Science. Hope physicians do the same thing with medical books ;o)

Many software developers tend to grab library methods to get different tasks accomplished. That makes sense. That said; it is a good idea to go back and review if the code is as optimal as needed. In my case I am comparing the performance of different sorting algorithms. If interested get a copy of Algorithms and take it for a spin. Continue reading “Sort Times – Part I”

Shell Sort

shell_sortI spent some time reading (section 2.1 in the Algorithms fourth edition by Robert Sedgewick and Kevin Wayne) and experimenting with the Shell Sort algorithm.

The Shell sort algorithm is an optimized Insertion sort. The idea is to reduce the number of exchanges by presorting elements in sub sequences. Continue reading “Shell Sort”