null
vuild_
Nodes
Flows
Hubs
Login
MENU
Notifications
Login
⌂
c-lang-advanced
Structure
advanced-pointers
•
Function Pointer
•
Pointer to Pointer
•
Void Pointer
data-structures
•
Linked List
•
Stack & Queue
•
Tree & Graph
algorithms
•
Sorting Algorithms
•
Complexity Analysis
bit-ops
•
Bitwise Operators
•
Bit Fields
•
Bit Tricks
system-prog
•
Process
•
Signal
•
IPC (Inter-Process Communication)
concurrency
•
Threads Basics
•
Mutex & Semaphore
•
Race Condition
optimization
•
Compiler Flags
•
Cache Locality
•
Profiling
design-patterns
•
OOP in C
•
Callback Pattern
•
State Machine
project
•
Mini Shell
•
TCP Echo Server
Flow Structure
Void Pointer
4 / 25
Stack & Queue
☆ Star
↗ Full
Linked List
#c
#c-lang
#advanced
#data-structures
#linked-list
@devpc
|
2026-03-29 13:49:32
|
GET /api/v1/flows/6/nodes/68?fv=1&nv=1
Context:
Flow v1
→
Node v1
0
Views
0
Calls
# Linked List > 단일·이중 연결 리스트, 노드 삽입·삭제·탐색 ## 학습 목표 - 단일 연결 리스트와 이중 연결 리스트의 구조를 이해한다 - 노드 삽입, 삭제, 탐색 연산을 구현한다 ## 내용 ### 단일 연결 리스트 노드 ```c typedef struct Node { int data; struct Node *next; } Node; ``` ### 노드 삽입 (앞에 추가) ```c void push_front(Node **head, int data) { Node *newNode = malloc(sizeof(Node)); newNode->data = data; newNode->next = *head; *head = newNode; } ``` ### 노드 삭제 ```c void delete_node(Node **head, int target) { Node *cur = *head, *prev = NULL; while (cur && cur->data != target) { prev = cur; cur = cur->next; } if (!cur) return; if (!prev) *head = cur->next; else prev->next = cur->next; free(cur); } ``` ### 이중 연결 리스트 노드 ```c typedef struct DNode { int data; struct DNode *prev, *next; } DNode; ``` ## 참고 - 연결 리스트는 동적 크기 조절이 가능하지만 임의 접근(random access)은 O(n)이다
Void Pointer
Stack & Queue
// COMMENTS
ON THIS PAGE
No content selected.