Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void printPaths(Stack<Integer> path) {
- Stack<Integer> aux = new Stack<Integer>();
- aux.addAll(path);
- Stack<Integer> auxInverted = new Stack<Integer>();
- while(!aux.isEmpty())
- auxInverted.push(aux.pop());
- System.out.print("Camino: ");
- while(!auxInverted.isEmpty())
- System.out.print(nodes.get(auxInverted.pop()).data + "-> ");
- System.out.println("");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement