Showing posts with label BFS. Show all posts
Showing posts with label BFS. Show all posts

Wednesday, September 17, 2014

Printing level order algorithim

Two types of search are popular in Binary Tree. Breadth First Search (BFS) and Depth First Search (DFS) . Printing the level order is slightly complex since you need to keep track of the height of the particular node to implement the level order printing. Its a kind of BFS node tracking using the height.
Here is a c implementation of printing level order for a Binary Tree.


Wednesday, August 20, 2014

Binary Tree - Depth First Search Algorithm

Here is a Binary Tree search algorithm implementation in C for Depth First Search algorithm. The preOrder , inOrder and postOrder implementation are done thru recursive call approach.