linkedlist1 [자료구조] Linked List 직접 구현하기. Linked list - 각 노드가 데이터와 포인터를 가지고 한 줄로 연결되어 있는 방식으로 데이터를 저장하는 자료 구조이다. (위키백과) [구현하기] class MyNode { public next: null | undefined | MyNode; public value: T; constructor(value: T) { this.value = value; this.next = null; } } class LinkedList { private head: MyNode; private tail: MyNode; private length = 0; constructor(value: T) { this.head = new MyNode(value); this.tail = this.head; this.length = .. 2021. 3. 30. 이전 1 다음