Study/Today I Learn
2019. 4. 16.
[TIL] 2019.04.16 - Linked List
Linked List 구현 (javascript) class Node { constructor (value) { this.value = value this.next = undefined } } class LinkedList { constructor () { var dummy = new Node("dummy") this.before = undefined this.current = undefined this.head = dummy this.tail = dummy this.num_of_data = 0 } append (value) { var new_node = new Node(value) this.tail.next = new_node this.tail = new_node this.num_of_data += 1..