구현 소스 PriorityQueue.h #ifndef PRIORITYQUEUE_H #define PRIORITYQUEUE_H #include #include #include typedef struct tagPQNode { int Priority; // 우선순위 void* Data; // 다양한 자료형을 우선순위큐 안에 담을 수 있도록 void* type으로 선언함. } PQNode; typedef struct tagPriorityQueue { PQNode* Nodes; // Node를 담는 배열 int Capacity; int UsedSize; } PriorityQueue; //////////// 함수 정의 /////////////// PriorityQueue*PQ_Create(int Init); voi..
구현소스 Heap.h #ifndef HEAP_H #define HEAP_H #include #include #include typedef int Element; typedef struct tagHeapNode { Element Data; } HeapNode; typedef struct tagHeap { HeapNode* Nodes; // 힙 배열 int Capacity; // 최대 용량 int UsedSize; // 사용 용량 } Heap; // Heap // 1. Heap은 완전 이진 트리 구조 // 2. Heap에서 가장 작은 데이터를 갖는 노드는 Root 노드이다. // 3. 완전 이진 트리를 유지하기 위해선 Node의 삽입 연산 수행시 최고 깊이, 최 우측에 새 노드를 추가 해야 한다. // - ..
구현소스 BinarySearchTree.h #ifndef BINARY_SEARCH_TREE_H #define BINARY_SEARCH_TREE_H #include #include typedef int Element; typedef struct tagBSTNode { struct tagBSTNode *Left; struct tagBSTNode *Right; Element Data; } BSTNode; BSTNode*BST_CreateNode(Element NewData); voidBST_DestroyNode(BSTNode* Node); voidBST_DestroyTree(BSTNode* Tree); BSTNode*BST_SearchNode(BSTNode* Tree, Element Target); BSTNo..
구현 소스 BinarySearch.h #ifndef BINARY_SEARCH_H #define BINARY_SEARCH_H #include #include #include typedef int Element; Element BinarySearch(Element Data[], int Size, Element Target); #endif ---------------------------------------------------------------------------------------- BinarySearch.cpp #include "BinarySearch.h" Element BinarySearch(Element Data[], int Size, Element Target) { int Left, Mid..
구현소스 LinkedList.h #ifndef LINKEDLIST_H #define LINKEDLIST_H #include #include typedef int Element; typedef struct tagNode{ struct tagNode *NextNode; Element Data; } Node; Node* SLL_CreateNode(Element NewData); // 노드 생성 void SLL_DestroyNode(Node* Node); // 노드 파괴 void SLL_AppendNode(Node** Head, Node* NewNode); // 노드를 추가하는 함수 - 링크드 리스트 젤 끝(tail)에 추가 void SLL_RemoveNode(Node** Head, Node* Remove);/..
구현소스 #include #include #include int Compare(const void* _elem1, const void* _elem2) { int* elem1 = (int*)_elem1; int* elem2 = (int*)_elem2; // 오름차순으로 정렬하도록.. if(*elem1 > *elem2) return 1; else if(*elem1 < *elem2) return -1; else return 0; } void PrintArray(int Data[], int Length){ int i=0; int count=0; printf(" ---- Data ----\n"); for(i=0;i
구현소스 ExpressionTree.h #ifndef EXPRESSION_TREE_H #define EXPRESSION_TREE_H #include #include #include typedef double Element; typedef struct tagETNode { struct tagETNode* Left; struct tagETNode* Right; Element Data; } ETNode; // 노드생성 ETNode* ET_CreateNode(Element NewData); // 노드 파괴 void ET_DestroyNode(ETNode* Node); // 수식 트리 파괴 - 후위순회 void ET_DestroyTree(ETNode* Root); // 전위 순회 void ET_PreorderPr..
구현소스 QuickSort.h #ifndef QUICKSORT_H #define QUICKSORT_H #include void Quick_Sort(int Data[], int left, int right, int size); int Partition(int Data[], int left,int right); void Swap(int *a, int *b); void Print_Array(int Data[], int size); #endif ------------------------------------------------------------------ QuickSort.cpp #include "QuickSort.h" void Print_Array(int Data[], int size){ int i; ..
구현 소스 InsertionSort.h #ifndef INSERTIONSORT_H #define INSERTIONSORT_H #include #include void InsertionSort(int Data[], int size); #endif -------------------------------------------------------------------- InsertionSort.cpp #include "InsertionSort.h" void InsertionSort(int Data[], int size){ int i; int j; int value; int k; for(i=1 ; i
구현 소스 BubbleSort.h #ifndef BUBBLESORT_H #define BUBBLESORT_H #include void BubbleSort_Ascending(int Data[], int size); void BubbleSort_Descending(int Data[], int size); int IsSorting_Ascending(int Data[], int size); int IsSorting_Descending(int Data[], int size); #endif ------------------------------------------------------------------------- BubbleSort.cpp #include "BubbleSort.h" void BubbleSor..
- Total
- Today
- Yesterday
- SetTimer
- PackMan
- 그림 맞추기 게임
- Data Structures in C
- PtInRect
- Tales of the Float Land
- WinAPI
- Hash table
- WM_TIMER
- Kinect Programming
- quick sort
- MFC 예제
- Pixel 색상값으로 구현한 간단한 충돌
- Linked list
- 윈도우즈 API 정복
- Farseer Physics
- WM_CONTEXTMENU
- Tree
- Game project
- Digits Folding
- 2D Game Project
- 열혈강의C
- Ice Climber
- Queue
- IntersectRect
- Kinect Game Project
- 뇌를 자극하는 알고리즘
- Win32 API
- graph
- Stack
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |