Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
Tags
- 변수
- java
- dfs
- 코딩테스트
- REST API
- 인접리스트
- LifeCycle
- Interceptor
- html
- node.js
- Deep Dive
- queue
- css
- 탐욕법
- nestjs
- winston
- OOP
- Spring
- 알고리즘
- MySQL
- 인접행렬
- 자료구조
- GraphQL
- JWT
- logger
- javascript
- TIL
- bean
- typescript
- 프로그래머스
Archives
- Today
- Total
목록이중연결리스트 구현 (1)
처음부터 차근차근
[Javascript] 이중 연결 리스트 구현
이번에는 이중 연결 리스트를 구현했다. Doublylinkedlist 구현 // 이중 연결 리스트 Class Node class Node { constructor(data) { this.data = data; this.next = null; // 이중 연결 리스트이기 때문에 이전 값도 추가되어야 한다. this.prev = null; } } class DoublyLinkedList { constructor() { // 처음 만들었을 경우, head는 null을 넣어야 한다. this.head = null; // 마지막도 null을 해준다. this.tail = null; // 연결 리스트의 크기를 보기 위해 삽입 this.length = 0; } pushFirst(data) { let newNode = ..
CS/자료구조
2023. 11. 3. 18:14