i've done this
remove todo
define data type
failing test case for building a graph
make the test pass
make the graph structure more sensible
step
add helper function
build the graph
note down todo
that was easier than i thought
next step is to rewrite in a graph search and fix a few bugs in isValid