Skip to content

сортировочный список#2

Open
dfdf11-cpu wants to merge 2 commits intomainfrom
sorting_list
Open

сортировочный список#2
dfdf11-cpu wants to merge 2 commits intomainfrom
sorting_list

Conversation

@dfdf11-cpu
Copy link
Owner

в файле sort_list.c написана программа, которая в диалоговом режиме осуществляет операции:
0 – выйти;
1 – добавить значение в сортированный список;
2 – удалить значение из списка;
3 – распечатать список.

@dfdf11-cpu dfdf11-cpu requested a review from chernishev October 28, 2025 19:17
print();
}
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не удаляете список в конце

#include <stdio.h>
#include <stdlib.h>

struct list {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

я бы заtypedef-ал


struct list* head = NULL;

void add(int val) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

контракты во всех функциях плохие: Вы работаете с конкретным списком (head); а надо с любым, который будет параметром

Copy link
Collaborator

@chernishev chernishev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4/6 замечания в коде

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants