Skip to content

Second attempt of test#75

Open
MinyazevR wants to merge 3 commits intomainfrom
SecondAttemptOfTest
Open

Second attempt of test#75
MinyazevR wants to merge 3 commits intomainfrom
SecondAttemptOfTest

Conversation

@MinyazevR
Copy link
Copy Markdown
Owner

No description provided.

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

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
Copy link
Copy Markdown

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++)
Copy link
Copy Markdown

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

Copy link
Copy Markdown

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