Brett 2022-12-26 01:02:46 -05:00
parent 8b6f2978f5
commit a772fb42d5
1 changed files with 3 additions and 6 deletions

View File

@ -31,13 +31,10 @@ namespace BLT {
public:
void insert(const T& t) {
auto newNode = new node<T>(t, nullptr);
if (head == nullptr)
head = newNode;
else {
newNode->next = head;
head = newNode;
}
head = new node<T>(t, nullptr);
else
head = new node<T>(t, head);
}
[[nodiscard]] const T& front() const {