Use a more efficient algorithm
The deleteDuplicateEntries() routine is not very efficient. There's no need to traverse the entire list for each value. If we proceed from the head to the tail, we know that there cannot be any duplicates in the part of the list we've already processed, so all that's necessary is to search the remainder of the list. Here's how I'd do it:
void deleteDuplicateEntries() {
for (ListNode<Type> *curr = _head; curr && curr->next; curr = curr->next) {
ListNode<Type> *n = curr;
for ( ; n && n->next; n = n->next) {
while (n->next && curr->value == n->next->value) {
// delete matching node
auto victim = n->next;
n->next = victim->next;
--_size;
delete victim;
}
}
// does last node match?
if (n && n->value == curr->value) {
delete n;
--_size;
curr->next = nullptr;
_tail = curr;
}
}
}
Use nullptr rather than NULL