Graphs
BE=SIDES
(queue) (Stack)(Backtracking)
A B
F
F
D
c
Breadth first search Depth first search
stack
Print:-
HEY
AKIF queue
E
ACFDBE
B-
Print:- ABC FED
D Print while push
F
Pop one and enquene all
when cornered, do
c
its adjacent vertices
backtracing.
Kruskal's Algorithm & Prims:_
→ Shouldn't consider edge which would make
graph a cycle
5
A B 4
7
F
6 2
F 3
2
8