Skip to content

Commit 1da180f

Browse files
authored
Merge pull request #1 from harris854/master
Minor corrections
2 parents a8db294 + cb5b149 commit 1da180f

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

data-structures/doubly-linked-list/DoublyLinkedList.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ class MyLinkedList {
139139
int popBack() {
140140
int item;
141141
if (isEmpty()) {
142-
cout<<"List if empty"<<endl;
142+
cout<<"List is empty"<<endl;
143143
return -99999;
144144
} else {
145145
item = tail->data;
@@ -159,7 +159,7 @@ class MyLinkedList {
159159
// removes an item with value 'key'
160160
void remove(int key) {
161161
if (isEmpty()) {
162-
cout<<"list is empty"<<endl;
162+
cout<<"List is empty"<<endl;
163163
return;
164164
}
165165

data-structures/doubly-linked-list/doubly_linked_list.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def insert_at_back(self, value):
2828
node = Node(value)
2929
if self.is_empty():
3030
self.head = node
31+
self.tail = node
3132
else:
3233
self.tail.next = node
3334
node.prev = self.tail

0 commit comments

Comments
 (0)