发一个我昨天写的 private static void join(Node a, Node b) { a.right = b; b.left = a; }
/** helper function -- given two circular doubly linked lists, append them and return the new list. */ private static Node append(Node a, Node b) { if (a==null) return b; if (b==null) return a;