added a method to reverse a list with vertices
finished findShortestWay for undirected graphs without edge-weights