I want to walk through a graph egdes two times, back and forth then return the path in a vector, it works fine with small node values, but when the node number is big ,for