Skip to content

оптимальная сортировка - #3

Open
EStarikov wants to merge 6 commits into
mainfrom
optimal_sort
Open

оптимальная сортировка#3
EStarikov wants to merge 6 commits into
mainfrom
optimal_sort

Conversation

@EStarikov

Copy link
Copy Markdown
Owner

No description provided.

@EStarikov
EStarikov requested a review from chernishev October 5, 2025 16:01
Comment thread src/optimal_sort/functions.h Outdated
@@ -0,0 +1 @@
void quicksort(int* mas, int size); No newline at end of file

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

не хватает include guards

Comment thread src/optimal_sort/instuction.md Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

лучше README.md

Comment thread src/optimal_sort/instuction.md Outdated
@@ -0,0 +1 @@
write "make -f Makefile" No newline at end of file

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

лучше просто "make"

Comment thread src/optimal_sort/main.c Outdated
}
printf("%d", count);
free(numbers);
return 0;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

не тот код возвращаете, читайте условие внимательно

Comment thread src/optimal_sort/main.c
while (scanf("%d", &arr[index]) == 1) {
index++;
}
int* numbers = (int*)malloc(sizeof(int) * index);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

это не нужно

Comment thread src/optimal_sort/Makefile Outdated
@@ -0,0 +1,6 @@
all:
gcc -S quicksort.c -o quicksort.s
gcc main.c quicksort.c -o qsort

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

тут должно быть не так

@chernishev chernishev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

пока 3/5. замечания на github

Comment thread src/optimal_sort/Makefile Outdated
@@ -0,0 +1,6 @@
all:
gcc -S quicksort.c -o quicksort.s
gcc main.c quicksort.c -o qsort

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Всё ещё не так

Comment thread src/optimal_sort/quicksort.c Outdated
@@ -0,0 +1,29 @@
#include "functions.h"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Хедер и его исходный файл должны называться одинаково

Comment thread src/optimal_sort/main.c Outdated
Comment on lines +14 to +16
for (int i = 0; i < index; i++) {
numbers[i] = arr[i];
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Можно воспользоваться mempcy

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