use all our helper methods to construct the depth first search find longest increasing path algorithm