일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- flask
- Python
- 파이썬머신러닝완벽가이드
- recursion
- cpp
- shapeArea
- markdown
- baekjun
- Numpy
- 수 정렬하기
- 10953
- almostIncreasingSequence
- 2015 봄학기 알고리즘
- codesignal
- Daily Commit
- collections.deque
- matrixElementsSum
- Counting cells in a blob
- Sequential Search
- data_structure
- centuryFromYear
- 백준
- til
- All Longest Strings
- 파이썬 포렌식
- 피보나치 수
- 2750
- codesingal
- adjacentElementsProduct
- C++
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