Skip to content

Update main.cpp#9

Open
kindofman wants to merge 2 commits into
masterfrom
kindofman-patch-9
Open

Update main.cpp#9
kindofman wants to merge 2 commits into
masterfrom
kindofman-patch-9

Conversation

@kindofman

@kindofman kindofman commented Nov 18, 2019

Copy link
Copy Markdown
Owner

Ссылка на Яндекс.Контест https://contest.yandex.ru/contest/15369/run-report/25909812/

@kindofman kindofman requested a review from ylyubimov November 18, 2019 13:43

@ylyubimov ylyubimov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Где ссылка на контест?

Comment thread 8-2/main.cpp Outdated
bool remove(const string& key);

private:
size_t get_hash( const string& key, size_t m ) const;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

hash задается вне класса.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Сделано

Comment thread 8-2/main.cpp

using namespace std;

class HashTable {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Давай сделаем Хеш-таблицу шаблонной с хеш-функцией передаваемой снаружи

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Готово

Comment thread 8-2/main.cpp Outdated

#include <assert.h>

using namespace std;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

это нехорошо

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Поправил

Comment thread 8-2/main.cpp Outdated
class HashTable {
public:
explicit HashTable(size_t initial_size);
~HashTable() = default;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

если тебе деструктор default подходит, то может и все остальное подойдет?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Убрал строки из правила пяти

Comment thread 8-2/main.cpp Outdated

private:
size_t get_hash( const string& key, size_t m ) const;
bool is_Nil( const string& key ) { return key != "Deleted" ? key.empty() : true; }

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ключи deleted и empty должны быть константами класса. Должна быть возможность их поменять в конструкторе.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Готово

Устранил замечания. Ссылка на Яндекс.Контест https://contest.yandex.ru/contest/15369/run-report/25909812/
@kindofman kindofman requested a review from ylyubimov November 23, 2019 20:40
@ylyubimov

Copy link
Copy Markdown
Collaborator

cсылки на контест так и не появилось((

@ylyubimov ylyubimov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Жду ссылку

@ylyubimov

Copy link
Copy Markdown
Collaborator

Ссылка на Яндекс.Контест https://contest.yandex.ru/contest/15369/run-report/25909812/

@ylyubimov ylyubimov self-requested a review November 30, 2019 14:46
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