до +50. Найти минимальный элемент и сделать его
вот мой код но мне сказали что это односвязный список
#include
#include
#include
int main()
{
struct TNode
{
int value;
struct TNode* next;
} *first = NULL, * second = NULL, * node = NULL;
size_t count;
setlocale(LC_ALL, "Rus");
printf("введите число элементов: ");
scanf_s("%u", &count);
while (count--)
{
node = (struct TNode*)malloc(sizeof(struct TNode));
node->value = rand() % 100 - 50;
if (node->value < 0)
{
node->next = second;
second = node;
}
else
{
node->next = first;
first = node;
}
printf("%d ", node->value);
}
printf("\n\n");
return 0;
}
помогите плиз с реализацией