BFS and DFS (Reachability)

Both BFS and DFS classes implement reachability test functions (general
and with a maximum of k arcs between them) with Breadth First Search
and Depth First Search algorithms respectively.