Update main.cpp#9
Open
kindofman wants to merge 2 commits into
Open
Conversation
ylyubimov
requested changes
Nov 21, 2019
ylyubimov
left a comment
Collaborator
There was a problem hiding this comment.
Где ссылка на контест?
| bool remove(const string& key); | ||
|
|
||
| private: | ||
| size_t get_hash( const string& key, size_t m ) const; |
Collaborator
There was a problem hiding this comment.
hash задается вне класса.
|
|
||
| using namespace std; | ||
|
|
||
| class HashTable { |
Collaborator
There was a problem hiding this comment.
Давай сделаем Хеш-таблицу шаблонной с хеш-функцией передаваемой снаружи
|
|
||
| #include <assert.h> | ||
|
|
||
| using namespace std; |
| class HashTable { | ||
| public: | ||
| explicit HashTable(size_t initial_size); | ||
| ~HashTable() = default; |
Collaborator
There was a problem hiding this comment.
если тебе деструктор default подходит, то может и все остальное подойдет?
Owner
Author
There was a problem hiding this comment.
Убрал строки из правила пяти
|
|
||
| private: | ||
| size_t get_hash( const string& key, size_t m ) const; | ||
| bool is_Nil( const string& key ) { return key != "Deleted" ? key.empty() : true; } |
Collaborator
There was a problem hiding this comment.
ключи deleted и empty должны быть константами класса. Должна быть возможность их поменять в конструкторе.
Устранил замечания. Ссылка на Яндекс.Контест https://contest.yandex.ru/contest/15369/run-report/25909812/
Collaborator
|
cсылки на контест так и не появилось(( |
Collaborator
|
Ссылка на Яндекс.Контест https://contest.yandex.ru/contest/15369/run-report/25909812/ |
ylyubimov
approved these changes
Nov 30, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ссылка на Яндекс.Контест https://contest.yandex.ru/contest/15369/run-report/25909812/