We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cd99de6 commit 3f8df6cCopy full SHA for 3f8df6c
insert_at_tail_practice.cpp
@@ -30,7 +30,7 @@ void insert_at_tail(Node *&head, int val)
30
Node *newNode = new Node(val);
31
if (head == NULL)
32
{
33
- head = newNode;
+ head->next = newNode;
34
return;
35
}
36
0 commit comments