-
Notifications
You must be signed in to change notification settings - Fork 0
Second attempt of test #75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| { | ||
| arrayOfCount[arrayOfNumbers[i] - minimumElementInArray]++; | ||
| } | ||
| int distribution�ounter = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| int distribution�ounter = 0; | |
| int distributionCounter = 0; |
| int minimum = INT_MAX; | ||
| int maximum = INT_MIN; | ||
| int array[1000] = { 0 }; | ||
| // You can enter no more than 1000 numbers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Сообщения пользователю довольно бесполезно писать как комментарии в коде
| int* count = countSortArray(array, counter); | ||
| printf("\n"); | ||
| printf("element - quanity\n"); | ||
| for (int i = 0; i < counter; i++) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Можно было бежать прямо по count, только надо знать его размер
| } | ||
| printf("%d - %d\n", array[i], count[array[i] - minimum]); | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тут ещё должно быть free(count), тем более что в тестах Вы это делаете
No description provided.