diff --git a/src/data-structures/linked-list/LinkedList.js b/src/data-structures/linked-list/LinkedList.js
index ba7d0e3ee1..4c8d32b2c8 100644
--- a/src/data-structures/linked-list/LinkedList.js
+++ b/src/data-structures/linked-list/LinkedList.js
@@ -80,8 +80,10 @@ export default class LinkedList {
           this.tail.next = newNode;
           this.tail = newNode;
         } else {
-          this.head = newNode;
-          this.tail = newNode;
+          // this.head = newNode;
+          // this.tail = newNode;
+          newNode.next = this.head;
+          newNode = this.head;
         }
       }
     }