Skip to content

Commit 29bfb14

Browse files
committed
--update : seperate Node and DLL file
1 parent da1729c commit 29bfb14

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
class Node {
2+
constructor(data, previous, next) {
3+
this.data = data;
4+
this.previous = previous;
5+
this.next = next;
6+
}
7+
}
8+
module.exports = Node;

src/_DataStructures_/DoublyLinkedList/index.js

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
/* eslint-disable class-methods-use-this */
2-
class Node {
3-
constructor(data, previous, next) {
4-
this.data = data;
5-
this.previous = previous;
6-
this.next = next;
7-
}
8-
}
2+
const Node = require('./Node');
93

104
class DoublyLinkedList {
115
constructor() {

0 commit comments

Comments
 (0)