News for hackers. Stuff that matters.
Re:Simple algorithms by baddox on Thursday April 14, 2011 @01:58PM (#2447770)
I like the writing style and simplicity of presentation. I would recommend putting some thought into the order and organization of the articles. Perhaps you should have "main" articles about data structures, then sub-articles about the algorithms that are relevant to them (e.g. "binary search" could be under "arrays," "heapsort" and "priority queue" operations under "heaps," etc.). Obviously, it's a challenge to choose the order and organization of topics and subtopics—it's essentially the task of developing a curriculum.

If you plan on doing some tree/graph algorithms, perhaps you could have a brief introduction to the topic by talking about trees and graphs in general, then proceeding by discussing heaps, simple binary trees (which can branch off into more advanced topics like the various balanced binary trees), and so forth.

As a side note, I think binary trees are a great visual way to introduce the concept of asymptotic running time in a more accessible/pragmatic (albeit less rigorous) way, by showing that the more balanced a binary tree is, the fewer steps it will take on average to find an element (approaching the best-case of log base 2 of n). You can show how a worst-case unbalanced binary tree degrades to a linked list.

Re:Simple algorithms by latch on Thursday April 14, 2011 @07:43PM (#2448911)
I struggled with the ordering. I wanted to do linear searching first, because i thought it was the most fundamental and important to understand for the other stuff. And then I didn't want to do binary search right away because it's more complex.

I'd like to add more, but as I said in another comment, when I started doing quicksort, it didn't feel right. I'd likely need to build a different UI paradigm to represent more complicated algorithms. Same with a btree, I really want to go over it, but that seemed like a ball of UI hurt. Might still try to tackle it though.

Re:Simple algorithms by trobertson on Friday April 15, 2011 @07:54AM (#2450217)
One thing I noticed was that you use an array in your linear search example. The example is good, but assumes that the reader knows what an array is. Perhaps you should switch the linear search and array positions, so that you know the reader will know what an array is before using it in your examples?