알고리즘

#pragma once #ifndef CIRCULAR_QUEUE_H #define CIRCULAR_QUEUE_H #include #include typedef int ElementType; typedef struct tagNode { ElementType Data; }Node; typedef struct tagCircularQueue { int Capacity; int Front; int Rear; Node* Nodes; } CircularQueue; void CQ_CreateQueue(CircularQueue** Queue, int Capacity); void CQ_DestroyQueue(CircularQueue* Queue); void CQ_Enqueue(CircularQueue* Queue, Ele..
#pragma once #ifndef ARRAYSTACK_H #define ARRAYSTACK_H #include #include typedef int ElementType; typedef struct tagNode { ElementType Data; } Node; typedef struct tagArrayStack { int Capacity; int Top; Node* Nodes; }ArrayStack; void AS_CreateStack(ArrayStack** Stack, int Capacity); void AS_DestroyStack(ArrayStack* Stack); void AS_Push(ArrayStack* Stack, ElementType Data); ElementType AS_Pop(Arr..
Score.h #pragma once typedef struct { int number; double score; } Score; Score DataSet[] = { /* 번호, 점수*/ 1, 877.88, 2, 176.23, 3, 365.92, 4, 162.44, 5, 148.86, 6, 89.74, 7, 342.52, 8, 811.02 }; BinarySearch.c #include #include #include "Score.h" Score* BinarySearch(Score ScoreList[], int Size, double Target) { int Left, Right, Mid; Left = 0; Right = Size - 1; while (Left ScoreList[Mid].score) { ..
#include #include using namespace std; int main(){ int NUM; scanf("%d", &NUM); int i = 2; while(NUM != 0 && i
오뚜깅
'알고리즘' 카테고리의 글 목록 (4 Page)