Skip to content

Conversation

@kindofman
Copy link
Owner

@kindofman kindofman commented Nov 18, 2019

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

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

@ylyubimov ylyubimov left a comment

Choose a reason for hiding this comment

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

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

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

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

Choose a reason for hiding this comment

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

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

Copy link
Owner Author

Choose a reason for hiding this comment

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

Сделано


using namespace std;

class HashTable {
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
Owner Author

Choose a reason for hiding this comment

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

Готово

8-2/main.cpp Outdated

#include <assert.h>

using namespace std;
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
Owner Author

Choose a reason for hiding this comment

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

Поправил

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

Choose a reason for hiding this comment

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

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

Copy link
Owner Author

Choose a reason for hiding this comment

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

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

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
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
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
Collaborator

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

Copy link
Collaborator

@ylyubimov ylyubimov left a comment

Choose a reason for hiding this comment

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

Жду ссылку

@ylyubimov
Copy link
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