Skip to content

Conversation

@MinyazevR
Copy link
Owner

No description provided.

{
arrayOfCount[arrayOfNumbers[i] - minimumElementInArray]++;
}
int distribution�ounter = 0;

Choose a reason for hiding this comment

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

Suggested change
int distributionounter = 0;
int distributionCounter = 0;

int minimum = INT_MAX;
int maximum = INT_MIN;
int array[1000] = { 0 };
// You can enter no more than 1000 numbers

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++)

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]);
}

Choose a reason for hiding this comment

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

Тут ещё должно быть free(count), тем более что в тестах Вы это делаете

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