Monday, December 25, 2017

   
BREADTH FIRST SEARCH
Visit. Queue
A.  [B,C]
B.  [C,D,E,F]

Gimme a Queue (First in, First out)
Push a Node

While queue is NOT empty
     Visit first in Queue
     Add Children to Queue

DEPTH FIRST SEARCH
Visit. Next in Line
A [B,C]
B [D,E,F,C]
D [E,F,C]
Visit Node
DFS for Node Children

No comments:

Post a Comment