Skip to content

Sort list#16

Open
Quark1111 wants to merge 18 commits intomainfrom
sort_list
Open

Sort list#16
Quark1111 wants to merge 18 commits intomainfrom
sort_list

Conversation

@Quark1111
Copy link
Owner

No description provided.

@Quark1111 Quark1111 requested a review from chernishev October 28, 2025 20:30
src/sort_list.c Outdated
#include<stdio.h>
#include<stdlib.h>
#include<stdbool.h>
typedef struct sort_list{
Copy link
Collaborator

Choose a reason for hiding this comment

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

надо бы переносов строк добавить, а то нечитабельно

src/sort_list.c Outdated
struct sort_list *next;
} sort_list;
void append(sort_list *begin, int value){
sort_list *new_elem = malloc(sizeof(sort_list));
Copy link
Collaborator

Choose a reason for hiding this comment

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

все системные функции проверяем на возвращаемое значение. всегда и везде; поправьте

src/sort_list.c Outdated
bool flag = 0;
new_elem->value = value;
while (p->next != NULL){
if (p->next->value > value){
Copy link
Collaborator

Choose a reason for hiding this comment

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

форматирование

Copy link
Collaborator

Choose a reason for hiding this comment

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

починить везде в программе

src/sort_list.c Outdated
p->next = new_elem;
}
}
void del_elem(sort_list *begin, int value){
Copy link
Collaborator

Choose a reason for hiding this comment

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

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.

5/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.

3 participants