Click here to Skip to main content
15,885,366 members
Articles / Programming Languages / Java / Java SE

Introduction to Graph with Breadth First Search(BFS) and Depth First Search(DFS) Traversal Implemented in JAVA

Rate me:
Please Sign up or sign in to vote.
4.83/5 (53 votes)
1 Jan 2013CPOL5 min read 824.6K   17.5K   61  
This article provides a brief introduction about graph data structure with BFS and DFS traversal algorithm.
The objective of this article is to provide a basic introduction about graphs and the commonly used algorithms used for traversing the graph, BFS and DFS. Breadth First Search (BFS) and Depth First Search (DFS) are the two popular algorithms asked in most of the programming interviews. This article will help any beginner to get some basic understanding about what graphs are, how they are represented, graph traversals using BFS and DFS.

Views

Daily Counts

Downloads

Weekly Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer Microsoft
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions