From 70eefa46ff5ced6725016c32002b297d094d10a1 Mon Sep 17 00:00:00 2001 From: echosteg Date: Thu, 5 Jan 2017 23:01:11 +0530 Subject: [PATCH 1/2] removed unused variable in Doubly linked list and amended insert method --- chapter05/03-DoublyLinkedList2.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chapter05/03-DoublyLinkedList2.js b/chapter05/03-DoublyLinkedList2.js index 9fe7d87b..896c256e 100644 --- a/chapter05/03-DoublyLinkedList2.js +++ b/chapter05/03-DoublyLinkedList2.js @@ -23,7 +23,7 @@ let DoublyLinkedList2 = (function () { append(element) { let node = new Node(element), - current, _tail; + _tail; if (this.getHead() === null) { //first node on list head.set(this, node); @@ -54,7 +54,7 @@ let DoublyLinkedList2 = (function () { if (position === 0) { //add on first position - if (!this.getHead()) { //NEW + if (!current) { //NEW head.set(this, node); tail.set(this, node); } else { From 915384266710267f6e327a44d750848a4c2d91ff Mon Sep 17 00:00:00 2001 From: echosteg Date: Fri, 6 Jan 2017 12:09:58 +0530 Subject: [PATCH 2/2] fixing issue #21 --- chapter06/01-Set2.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chapter06/01-Set2.js b/chapter06/01-Set2.js index 10e11b45..c177648e 100644 --- a/chapter06/01-Set2.js +++ b/chapter06/01-Set2.js @@ -55,7 +55,7 @@ let Set2 = (function () { } union(otherSet){ - let unionSet = new Set(); + let unionSet = new Set2(); let values = this.values(); for (let i=0; i