자료구조2 C언어 QUEUE 자료구조 대충 그려본 queue --------------HEADER--------------- #ifndef QUEUE #define QUEUE #include #define QUEUE_SIZE 10 typedef struct QUEUE { int front; int rear; int items[QUEUE_SIZE]; }queue; void InitQ(queue* q); void insertQ(queue* q, int item); int deleteQ(queue* q); bool isFull(queue q); bool isEmpty(queue q); int peek(queue q); #endif // !QUEUE --------------Queue.C--------------- #include "Queue.h".. 2023. 8. 14. C언어 STACK 자료구조 대충 그려본 STACK 자료구조 --------------HEADER--------------- #ifndef STACK #define STACK #include #define STACK_SIZE 10 typedef struct STACK_ { int top; int items[STACK_SIZE]; }stack; void InitializeStack(stack* stk); void push(stack* stk,int item); int pop(stack* stk); bool isFull(stack stk); bool isEmpty(stack stk); int top(stack stk); #endif // !STACK --------------STACK.C--------------- #include #i.. 2023. 8. 14. 이전 1 다음