Further optimized validUpTo(n,step) function

recognize that validUpTo doesn't have to check rows/cols up to step but
only that step. Improves performance by ~50%
Removed unnecessary code given problem constraints

The DepthFirstTraversal object is constructed for a given starting
vertex. There is no point in traversing other non-visited vertices in
graph because traversal is always intended to be to the source, s.