Reduce code in linked_list.cpp

@mariangusatu Your review please.
This commit is contained in:
Christian Clauss
2020-04-22 16:06:51 +02:00
committed by GitHub
parent b2799b6fbb
commit 367b981810

View File

@@ -14,15 +14,13 @@ void insert(int x) {
t = t->next;
}
node *n = new node;
t->next = n;
n->val = x;
n->next = NULL;
t->next = n;
} else {
node *n = new node;
n->val = x;
n->next = NULL;
start = n;
}
n->val = x;
n->next = NULL;
}
void remove(int x) {