linkedlist: head, tail reverse(): if head == null || tail == null: throw n = head swap(head, tail) before = null while n != null: after = n.next n.next = before before = n n = after
No comments:
Post a Comment