#include void quick_sort(int a[],int n) { int v,t; int i,j; if(n>1) { v = a[n-1]; i = -1; j = n-1; while(1) { while(a[++i] v); if( i >=j ) break; t = a[i]; a[i] = a[j]; a[j] = t; } t = a[i]; a[i] = a[n-1]; a[n-1] = t; quick_sort(a,i); quick_sort(a+i+1,n-i-1); } } void main() { int q; int a[10] = {6,3,1,4,2,9,7,0,8,5}; quick_sort(a,10); for(q=0;q
#include #define MAX 10 int front,rear; char queue[MAX]; void init_queue() { front = rear = 0; } void clear_queue() { front = rear; } int put(char* ch) { if( (rear+1)%MAX == front ) return -1; queue[rear] = *ch; rear = ++rear % MAX; return 0; } int get(char* ch) { if( rear == front ) return -1; *ch = queue[front]; front = ++front % MAX; return 0; } void main() { char a,b,c; init_queue(); put("1"..
#include #include #define MAX 10 int top; char stack[MAX]; void init_stack() { top = -1; } int push(char* ch) { if(top >= MAX-1) return -1; stack[++top] = *ch; } int put(char* ch) { if( top < 0 ) { printf("\nfailed\n"); return -1; } *ch = stack[top--]; } void main() { char a,b,c,d; init_stack(); put(&b); put(&c); put(&d); printf("%c%c%c",a,b,c); }
- Total
- Today
- Yesterday
- 혁오
- 청년
- 청년몽땅정보통
- 태풍발생
- 발생후
- 지원
- 유니티
- 지원금
- 뜻밖의 샤워
- 서울특별시
- android
- 서울시
- 아이유
- 공모전
- 청년정책
- 축제
- 연결 리스트
- 안드로이드
- Linked List
- 신청
- 공연
- 김광석 기타 코드
- 유머
- 문화
- 김광석 코드
- 고양이 깜놀
- 김광석
- 민경훈
- 버즈
- 임창정
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |