I am working on familiar algorithms now. Just finished up with LCS(longest common subsequence problem - part of Dynamic programming) and the 8 non-attacking queens problem.my code
in-place sorting algorithms
data structures
graph algorithms
popular questions
This part of my site will contain source code for some algorithms I have come across. It shall serve as a refresher for anyone who looks at the code, which is sprinkled carefully with comments
I like operating systems, because they are composed of some really wonderful designs and programs. I want to illustrate some data structures used in operating systems, and provide related resources.
Sorting is not usually done using programmed routines. Rather people use libraries or APIs to perform sorting operations. But it is nice to learn how some sorting algorithms work. The strategies used can help in solving other problems.
Primary understandings
Start with Bubble sort{src 1}, which aims at sending lesser elements to the right. It is an in-place sort, and steps through each element in the array. Comparisons are done with immediate successors, starting from the first element. If the successor is bigger, the two elements swap places. [function bubble0() in the source shown]. The complete idea of bubble sort
{Src 1} also shows insertion sort. Here we work like we have a hand of cards. You can see only one card initially, which is the first card in your hand. Then you look at the cards underneath (one by one). If it is bigger than the card above it, then move it one place upward. The upward motion continues until there is a bigger card in front, or we have come to the top of our hand.
A very well designed sort is Heap sort{src 2}. A heap is a tree data structure. The complete idea of heap sort
My name is Kevin Cannon. I live just outside of Vancouver, Canada. I've been dabbling in web design for a while, and this is my fourth template submitted to OSWD. Most of my work, no wait ... all of my work has been done for free so far. Maybe I will do web design for a living, but probably not.