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

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

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

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

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

뇌를 자극하는 알고리즘 - 6. 탐색 : 이진 탐색(Binary Search)

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

Programming/뇌를 자극하는 알고리즘 2010. 10. 21. 23:57
뇌를 자극하는 알고리즘 - 6. 탐색 : 순차 탐색(Sequential Search) - 전진이동법(Move To Front Method), 전위법(Transpose Method)

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

Programming/뇌를 자극하는 알고리즘 2010. 10. 20. 23:40
뇌를 자극하는 알고리즘 - 5. 정렬 : Quick Sort - qsort함수의 활용

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

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

Blog is powered by Tistory / Designed by Tistory

티스토리툴바