План v2 по диагностике (квиз 14/32) + 4 новые задачи (hash, heap, dijkstra, subnet) + тренажёр 60 карточек
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
// Задача 10 — хеш-таблица с открытой адресацией.
|
||||
// Реализуй методы ниже. Заглушка намеренно не проходит проверку.
|
||||
#include <cstddef>
|
||||
#include <vector>
|
||||
|
||||
class HashTable {
|
||||
public:
|
||||
explicit HashTable(std::size_t initial_capacity = 16) {
|
||||
(void)initial_capacity;
|
||||
}
|
||||
|
||||
void put(int key, int value) {
|
||||
(void)key;
|
||||
(void)value;
|
||||
}
|
||||
|
||||
bool get(int key, int& out) const {
|
||||
(void)key;
|
||||
(void)out;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool erase(int key) {
|
||||
(void)key;
|
||||
return false;
|
||||
}
|
||||
|
||||
std::size_t size() const { return 0; }
|
||||
|
||||
std::size_t capacity() const { return 16; }
|
||||
};
|
||||
Reference in New Issue
Block a user