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 |
Tags
- 인접행렬
- 인접리스트
- bean
- Spring
- REST API
- Interceptor
- Deep Dive
- dfs
- puppeteer
- TIL
- css
- GraphQL
- LifeCycle
- Kubernetes
- node.js
- JWT
- java
- 프로그래머스
- winston
- 자료구조
- typescript
- 알고리즘
- 코딩테스트
- javascript
- nestjs
- 탐욕법
- Linux
- OOP
- html
- MySQL
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