@@ -0,0 +1,1573 @@
+package main.algorithm.a.jian.zhi.offer;%0A%0Aimport java.util.Objects;%0Aimport java.util.Stack;%0A%0Aimport static java.lang.System.out;%0A%0A/**%0A * Title : main.algorithm.a.jian.zhi.offer %3Cbr%3E%0A * Description : %3Cbr%3E%0A *%0A * %E8%BE%93%E5%85%A5%E9%93%BE%E8%A1%A8%E7%9A%84%E7%AC%AC%E4%B8%80%E4%B8%AA%E8%8A%82%E7%82%B9%EF%BC%8C%E4%BB%8E%E5%B0%BE%E5%88%B0%E5%A4%B4%E5%8F%8D%E8%BF%87%E6%9D%A5%E6%89%93%E5%8D%B0%E5%87%BA%E6%AF%8F%E4%B8%AA%E7%BB%93%E7%82%B9%E7%9A%84%E5%80%BC%E3%80%82%0A *%0A * @author chile%0A * @version 1.0%0A * @date 2018/4/11 15:05%0A */%0Apublic class PrintListBackwards %7B%0A%0A    private static class Node%3CE%3E %7B%0A        E item;%0A        Node%3CE%3E prev;%0A        Node%3CE%3E next;%0A        Node(Node%3CE%3E prev, E item, Node%3CE%3E next) %7B%0A            this.item = item;%0A            this.prev = prev;%0A            this.next = next;%0A        %7D%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        Node%3CInteger%3E n0 = new Node%3C%3E(null, 0, null);%0A        Node%3CInteger%3E n1 = new Node%3C%3E(null, 1, null);%0A        Node%3CInteger%3E n2 = new Node%3C%3E(null, 2, null);%0A        Node%3CInteger%3E n3 = new Node%3C%3E(null, 3, null);%0A        Node%3CInteger%3E n4 = new Node%3C%3E(null, 4, null);%0A        Node%3CInteger%3E n5 = new Node%3C%3E(null, 5, null);%0A%0A        n0.next = n1;%0A        n1.prev = n0;%0A        n1.next = n2;%0A        n2.prev = n1;%0A        n2.next = n3;%0A        n3.prev = n2;%0A        n3.next = n4;%0A        n4.prev = n3;%0A        n4.next = n5;%0A        n5.prev = n4;%0A%0A        method1(n0);%0A    %7D%0A%0A    private static void method1(Node%3CInteger%3E node) %7B%0A        Node%3CInteger%3E tempNode = node;%0A        Stack%3CNode%3E stack = new Stack%3C%3E();%0A        while (Objects.nonNull(tempNode.next)) %7B%0A            stack.add(tempNode);%0A            tempNode = tempNode.next;%0A        %7D%0A        while (!stack.isEmpty()) %7B%0A            out.print(stack.pop().item);%0A        %7D%0A    %7D%0A%0A%0A%7D%0A

print list backwards