본문 바로가기 메뉴 바로가기

더 나은 프로그래머가 되기 위하여.

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

더 나은 프로그래머가 되기 위하여.

검색하기 폼
  • Trash (25)
    • Programming (25)
      • 뇌를 자극하는 알고리즘 (25)
  • 방명록

뇌를 자극하는 알고리즘 - 7. 우선순위 큐와 힙: 우선순위 큐(Priority Queue)

구현 소스 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..

Programming/뇌를 자극하는 알고리즘 2010. 10. 25. 16:01
뇌를 자극하는 알고리즘 - 7. 우선순위 큐와 힙: 힙(Heap)

구현소스 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의 삽입 연산 수행시 최고 깊이, 최 우측에 새 노드를 추가 해야 한다. // - ..

Programming/뇌를 자극하는 알고리즘 2010. 10. 23. 01:00
뇌를 자극하는 알고리즘 - 6. 탐색 : 이진 탐색 트리(Binary Search Tree)

구현소스 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..

Programming/뇌를 자극하는 알고리즘 2010. 10. 22. 00:03
이전 1 2 3 4 5 6 ··· 9 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
  • Game project
  • quick sort
  • WM_TIMER
  • Digits Folding
  • 그림 맞추기 게임
  • Tales of the Float Land
  • Kinect Programming
  • Hash table
  • 윈도우즈 API 정복
  • Ice Climber
  • 뇌를 자극하는 알고리즘
  • SetTimer
  • WM_CONTEXTMENU
  • 2D Game Project
  • Linked list
  • Farseer Physics
  • Pixel 색상값으로 구현한 간단한 충돌
  • graph
  • MFC 예제
  • PackMan
  • WinAPI
  • Queue
  • Kinect Game Project
  • 열혈강의C
  • Data Structures in C
  • PtInRect
  • IntersectRect
  • Win32 API
  • Tree
  • Stack
more
«   2025/11   »
일 월 화 수 목 금 토
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
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바