단일연결리스트1 단일연결리스트로 구현한 Stack, Queue 단일연결리스트로 구현한 Stack, QueueStackfirst in first out// 단일연결리스트로 구현한 stackclass Node{ constructor(value, next){ this.value = value; this.next = next; }}class Stack{ _size = 0; constructor(){ this.head = null; // 가장 위에 있는(가장 나중에 있는) 노드 this._size = 0; } get size(){ return this._size; } push(value){ const new_node = new Node(value, this.. 2022. 3. 10. 이전 1 다음