일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- recursion
- collections.deque
- matrixElementsSum
- 파이썬머신러닝완벽가이드
- Python
- Sequential Search
- shapeArea
- flask
- 수 정렬하기
- 백준
- 2015 봄학기 알고리즘
- Daily Commit
- baekjun
- almostIncreasingSequence
- C++
- data_structure
- 2750
- Numpy
- 10953
- 피보나치 수
- 파이썬 포렌식
- cpp
- centuryFromYear
- adjacentElementsProduct
- All Longest Strings
- til
- markdown
- codesingal
- Counting cells in a blob
- codesignal
Archives
- Today
- Total
Introfor
[data_structure] Linked List 본문
#include <stdio.h>
#include <stdlib.h>
typedef struct node{
int data;
struct node* next;
} Node;
int main(){
Node* head = NULL;
head = (Node*)malloc(sizeof(Node));
head->data = 1;
head->next = NULL;
Node* q = (Node *)malloc(sizeof(Node));
q->data = 2;
q->next = NULL;
head->next = q;
q = (Node *)malloc(sizeof(Node));
q->data = 0;
q->next = head;
head = q;
Node *p = head;
while(p!=NULL){
printf("%d\n", p->data);
p = p->next;
}
return 0;
}
'Doing > C&C++' 카테고리의 다른 글
[Recursion] Counting Cells in a Blob (0) | 2020.07.30 |
---|---|
Recursion. 미로찾기 (0) | 2020.07.28 |
[Algorithm] sequential Search (0) | 2020.07.01 |
[C++] Reference (0) | 2020.06.29 |
[C++] Pair, Vector STL (0) | 2020.06.29 |
Comments