Skip to content

5 hw c balance skobka#8

Open
Gosha924 wants to merge 7 commits intomasterfrom
5_hw_c_balance_skobka
Open

5 hw c balance skobka#8
Gosha924 wants to merge 7 commits intomasterfrom
5_hw_c_balance_skobka

Conversation

@Gosha924
Copy link
Owner

No description provided.

@Gosha924 Gosha924 requested a review from chernishev October 12, 2025 13:51
Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. тут в PR не нужные файлы
  2. вот тут неправильное дерево (больше к сортировочной станции относится) https://github.com/Gosha924/hw/network --- Вам надо от ветки со стеком делать ветки, их из них PR; кстати, предполагалось что на каждое задание будет своя ветка от master

{
const OBJ* current = top;
while (current != NULL) {
printf("%d\n", current->data);
Copy link
Collaborator

Choose a reason for hiding this comment

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

по-хорошему библиотека не должна ни чего печатать

if (string[i] == '[' || string[i] == ']') {
top = push(top, string[i]);
}
if (string[i] == '{' || string[i] == '}') {
Copy link
Collaborator

Choose a reason for hiding this comment

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

надо бы убрать это раскопирование

char string[100];
printf("Введите строку: ");
fgets(string, sizeof(string), stdin);
OBJ* top = NULL;
Copy link
Collaborator

Choose a reason for hiding this comment

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

странное название

for (int j = 0; j < lenStack(top) - 1; j++) {
int a = showElem(top, j);
int b = showElem(top, j + 1);
if (a - b < 3 && a - b > 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

тут не понятно что происходит, зачем вычитать?

} else {
printf("Корректная скобочная последовательность\n");
}
while (top != NULL) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

если это корректная скобочная последовательность, то этого делать не надо

Copy link
Collaborator

@chernishev chernishev left a comment

Choose a reason for hiding this comment

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

3/6, замечания в коде

@Gosha924 Gosha924 marked this pull request as ready for review November 13, 2025 12:02
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