January 2018
Intermediate to advanced
332 pages
7h 36m
English
Before its implementation, let's quickly jot down what we are about to do so that the actual implementation becomes a lot easier:
INITIALIZE tail to 0 for subsequent iterationsMARK source node as visitedWHILE result not found GET neighbors of latest visited node (extracted using tail) FOR each of the node IF node already visited RETURN Mark node as visited IF node is our expected result INITIALIZE result with current neighbor node WHILE not source node BACKTRACK steps by popping users from previously visited path until the source user ADD source user to the result CREATE and format result variable IF result found return control NO result found, add user to previously visited path ...
Read now
Unlock full access