How is Open Short Path First Routing Protocol implemented?

What are Graphs?

Real-World Uses of Graph

Graph Data Structure

Traversal in Graph

Depth-first search

procedure DFS(G, v) is
label v as explored
for all edges e in G.incidentEdges(v) do
if edge e is unexplored then
wG.adjacentVertex(v, e)
if vertex w is unexplored then
label e as a discovered edge
recursively call DFS(G, w)
else
label e as a back edge

Breadth-first search

procedure BFS(G, v) is
create a queue Q
enqueue v onto Q
mark v
while Q is not empty do
wQ.dequeue()
if w is what we are looking for then
return w
for all edges e in G.adjacentEdges(w) do
xG.adjacentVertex(w, e)
if x is not marked then
mark x
enqueue x onto Q
return null

Shortest Path Problems

What is Djiskstra Algorithm?

Routing Protocol

Conclusion

I automate things 😉