Finalized the implementation
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include <unordered_set>
|
||||
|
||||
class ImplGenerator
|
||||
{
|
||||
public:
|
||||
ImplGenerator(int nr_entries);
|
||||
bool has_more_numbers();
|
||||
int get_next_num();
|
||||
|
||||
private:
|
||||
int m_nr_entries;
|
||||
int internal_counter = 0;
|
||||
std::unordered_set<int> already_generated_numbers;
|
||||
|
||||
virtual int get_next_num_internal() = 0;
|
||||
};
|
||||
Reference in New Issue
Block a user