Breadth First Search in JavaScript
Aug 27, 2017 · 4 min read
In JavaScript programming, data can be stored in data structures like graphs and trees. Technically trees are graphs.
Graph Data Structures
Graphs evolved from the field of mathematics. They are primarily used to describe a model that shows the route from one location to another location.
A graph consists of a set of nodes and a set of edges. An edge is a pair of nodes that are connected. A path is a term used to describe traveling between nodes that share an edge. The image below shows a graph with 3…


