Skip to content

Conversation

@MinyazevR
Copy link
Owner

No description provided.

Copy link

@yurii-litvinov yurii-litvinov left a comment

Choose a reason for hiding this comment

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

Не работает совсем :) У Вас, наверное, тоже. Можно было спросить, почему :)

Choose a reason for hiding this comment

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

Вообще, .sln описывает целую программную систему. У Вас на каждый модуль свой .sln, что совершенно не нужно. Придерживайтесь принципа "Одна задача --- один .sln-файл", за исключением разве что кода, переиспользуемого между несколькими задачами.

This comment was marked as resolved.

Choose a reason for hiding this comment

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

Это можно было унифицировать с createTable, передавая туда начальный размер таблицы. Кстати, библиотечные словари во многих языках так и делают, принимают желаемый начальный размер в конструктор.

Choose a reason for hiding this comment

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

Лучше > 1

Choose a reason for hiding this comment

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

Suggested change
int numberOfompletedBuckets = 0;
int numberOfCompletedBuckets = 0;

Choose a reason for hiding this comment

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

Хеш-таблице tail не нужен, потому что список в среднем будет из одного элемента. Раз у Вас всё равно специализированный список, то можно и убрать. Это и код упростит

This comment was marked as resolved.

Choose a reason for hiding this comment

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

Эта штука вроде вообще не нужна теперь

Choose a reason for hiding this comment

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

Так лучше было бы назвать не head, а element или что-то такое. Это ведь голова списка только до первого head = head->next;

This comment was marked as resolved.

Copy link

@yurii-litvinov yurii-litvinov left a comment

Choose a reason for hiding this comment

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

Окей, зачтена

Choose a reason for hiding this comment

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

numberOfSegments лучше

Choose a reason for hiding this comment

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

const?

Comment on lines +89 to +91

Choose a reason for hiding this comment

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

Suggested change
free(element);
}
free(element);
}

Comment on lines +99 to +102

Choose a reason for hiding this comment

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

Ну, по-хорошему если resize не отработал, то стоит старый table не портить — транзакционность. Но ладно :)

Choose a reason for hiding this comment

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

Не поправлено :)

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