2025-03-17 14:00:57 +08:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
2025-03-21 18:54:51 +08:00
|
|
|
#include "array_stack.h"
|
2025-03-17 14:00:57 +08:00
|
|
|
#include "sq_list.h"
|
2025-03-24 09:37:44 +08:00
|
|
|
#include "array_queue.h"
|
2025-03-17 14:00:57 +08:00
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
|
|
|
|
2025-03-18 21:38:08 +08:00
|
|
|
|
2025-03-18 21:39:41 +08:00
|
|
|
|
2025-03-24 21:08:31 +08:00
|
|
|
/*sq_list* L = init_sq_list();
|
|
|
|
sq_list* N = init_sq_list();
|
|
|
|
for (int i = 1; i <= 3; i++)
|
|
|
|
{
|
|
|
|
N->data[i - 1] = i+10;
|
|
|
|
}
|
|
|
|
for (int i = 1; i <= 10; i++)
|
|
|
|
{
|
|
|
|
L->data[i - 1] = i;
|
|
|
|
}
|
|
|
|
N->length = 3;
|
|
|
|
L->length = 10;
|
|
|
|
print_sq_list(N);
|
|
|
|
print_sq_list(L);
|
|
|
|
mer_ge_sq_list(L,N);
|
|
|
|
print_sq_list(L);
|
|
|
|
printf("L->length:[%d]\n", L->length);*/
|
2025-03-21 18:54:51 +08:00
|
|
|
|
2025-03-24 21:08:31 +08:00
|
|
|
|
|
|
|
/* array_stack* stack = init_array_stack();
|
2025-03-21 18:54:51 +08:00
|
|
|
push_array_stack(stack, 1);
|
|
|
|
push_array_stack(stack, 2);
|
2025-03-24 21:08:31 +08:00
|
|
|
push_array_stack(stack, 3);*/
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-03-24 09:37:44 +08:00
|
|
|
array_queue *q = init_array_queue();
|
|
|
|
push_array_queue(q,0);
|
|
|
|
push_array_queue(q,1);
|
|
|
|
push_array_queue(q,2);
|
|
|
|
print_array_queue(q);
|
|
|
|
printf("---------------------\n");
|
2025-03-24 21:08:31 +08:00
|
|
|
/* pop_array_queue(q);
|
2025-03-24 09:37:44 +08:00
|
|
|
print_array_queue(q);
|
|
|
|
printf("----------\n");
|
|
|
|
push_array_queue(q, 666);
|
2025-03-24 21:08:31 +08:00
|
|
|
print_array_queue(q);*/
|
2025-03-17 14:00:57 +08:00
|
|
|
printf("Hello World!\n");
|
2025-03-20 23:34:22 +08:00
|
|
|
system("pause");
|
2025-03-17 14:00:57 +08:00
|
|
|
return 0;
|
2025-03-17 14:33:15 +08:00
|
|
|
}
|