ChetOS.net

My father-in-law, Bud Van Tassel, went to be with his Savior, June 27th, 2010, at 6:10pm.  Everyone who knew him loved him.  He will be missed.

In February it was discovered that he had stage four colon cancer.  By May it had spread throughout his body.
Posted by Chet at 5:53 PM1 Comment

If you change a graph traversal algorithm from stack-based to queue-based, you change it from depth-first to breadth-first.

Breadth-first is useful when you want to process siblings before processing their children.  Depth-first traversal processes as deep as it can before backtracking.

Interesting note: although this is clearly a use for recursion, either method can be implemented iteratively to save space on the stack (and sidestep potential stack overflow issues when there are many nodes).
Posted by Chet at 3:17 PM0 Comments

© 2010 Chet Zema π