Skip to content

Commit 3f8df6c

Browse files
Insert at tail practice done
1 parent cd99de6 commit 3f8df6c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

insert_at_tail_practice.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ void insert_at_tail(Node *&head, int val)
3030
Node *newNode = new Node(val);
3131
if (head == NULL)
3232
{
33-
head = newNode;
33+
head->next = newNode;
3434
return;
3535
}
3636

0 commit comments

Comments
 (0)