• + 0 comments

    I believe you can set nextB = headA->next at once and skip the extra step of changing the pointer with headB->next.