/
bvs22
/
draft
Обзор
Документация
Войти
/
bvs22
/
draft
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
data_struct_alg/data_strcut/queue/src/main_programm.c
39 строк
518 B
Batomunkuev Vladimir
Renamed dir
10 дек 2024, 17:26
10 дек 2024, 17:26
13e5472
Код
Авторство
О чём код?
#include <stdio.h> #include <stdlib.h> #include <time.h> #include "queue.h" #include "quick_sort.h" #define SIZE_QUEUE 10 int main() { struct queue* q; struct queue* low = NULL; struct queue* high = NULL; srand(time(NULL)); q = create_queue(rand() % 100); for (int i = 0; i < SIZE_QUEUE - 1; i++) { push(&q, rand() % 100); } low = q; high = q; while (high -> next != NULL) { high = high -> next; } print_queue(q); quick_sort(q, low, high); print_queue(q); destroy_queue(&q); return 0; }