Updated Linked List to look at head instead of count
This commit is contained in:
parent
23e7860e43
commit
700d6696c8
@ -42,7 +42,7 @@ namespace Datastructures {
|
||||
template <typename T>
|
||||
void LinkedList<T>::append(T value) {
|
||||
mCount++;
|
||||
if (mCount == 0) {
|
||||
if (mHead == nullptr) {
|
||||
mHead = std::make_shared<Nodes::LinkedListNode<T>>(value);
|
||||
mTail = mHead;
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user