Added a vector class and use it to store the paths generated by the dfs rather than printing them immediately.