Hi,
I've just started data structures....I'm studying Breadth first search and depth first search algo....Though I got some idea about them but after spending hours I can't understand the exact difference between them
Which one is better ?? Please help me out

Donno exactly what you wanna know abt the 2 methods but in simplest words when applies to a tree structure with say 3 levels:
BFS: Will test all nodes on one level before moving on to the next level.
DFS: will test all child nodes of the all levels belonging to one branch before back-tracking and repeating.

Don't I can explain better than wiki:
http://en.wikipedia.org/wiki/Breadth-first_search
http://en.wikipedia.org/wiki/Depth-first_search

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.