Skip to content

Comments

ДЗ № 6.1 Сортированный список, Шестаков Николай#11

Open
NicholayShestakov wants to merge 4 commits intomainfrom
sorted_list
Open

ДЗ № 6.1 Сортированный список, Шестаков Николай#11
NicholayShestakov wants to merge 4 commits intomainfrom
sorted_list

Conversation

@NicholayShestakov
Copy link
Owner

Add

  • Sorted list library
  • Console program for interaction with sorted list
  • Compilation instruction

Copy link
Collaborator

@WoWaster WoWaster left a comment

Choose a reason for hiding this comment

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

Не считая странной обработки ошибок, очень даже круто

List* createList();

// Deletes the sorted list and frees memory it used.
// Takes pointer on the sorted list.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Про Ваш английский писал в каком-то из соседних PR'ов :)

free(list);
}

void appendValue(List* list, 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.

Вообще append обычно объединяет списки, но вообще пойдёт

Comment on lines +72 to +74
if (list->head == NULL) {
printf("The list is empty. \n");
return;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Очень плохая идея. Возвращайте bool или используйте errorCode/outValue или запрещайте вызов функции на пустом списке

Comment on lines +82 to +85
if (list->tail->value < value) {
printf("The list not contains this value. \n");
return;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Аналогичный комментарий

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