dbl-linked-list-ds
Advanced tools
Comparing version 1.1.0 to 2.0.0
@@ -33,3 +33,3 @@ { | ||
}, | ||
"version": "1.1.0", | ||
"version": "2.0.0", | ||
"devDependencies": { | ||
@@ -36,0 +36,0 @@ "@types/mocha": "^5.2.5", |
@@ -13,4 +13,5 @@ import { LinkedListNode } from './LinkedListNode'; | ||
remove(n: LinkedListNode<T>): void; | ||
shift(): T | undefined; | ||
tail(): Node<T>; | ||
} | ||
export {}; |
@@ -40,3 +40,3 @@ "use strict"; | ||
pop() { | ||
const h = this.head(); | ||
const h = this.tail(); | ||
if (h !== undefined) { | ||
@@ -68,2 +68,9 @@ this.remove(h); | ||
} | ||
shift() { | ||
const h = this.head(); | ||
if (h !== undefined) { | ||
this.remove(h); | ||
return h.value; | ||
} | ||
} | ||
tail() { | ||
@@ -70,0 +77,0 @@ return this.tailN; |
186279
141