Block Interview Question

OOP, graph traversal