summaryrefslogtreecommitdiff
path: root/graphs/cpp/lookup_table/lookup_table.hh
blob: eb25d433f0c78907724fdac87644099286d21ce1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#pragma once

#include <optional>
#include <unordered_map>

class LookupTable
{
public:
    std::optional<long> get(int x);
    void set(int x, long value);

private:
    std::unordered_map<int, long> table_;
};