Can anybody give a link for a simple explanation on BFS and DFS with its implementation?
Heres the idea in basics:
get a new queue ...initalize it with the root node .... loop through the entire queue and keep removing an item from the queue and printing it out (or saving it etc) and check if the same item has any children , if so push them onto the queue and continue in the loop until you traverse the entire segment(graph)...