|
tgen
|
Miscellaneous generation. More...
Functions | |
| std::vector< long long > | tgen::misc::unordered_hack (int size) |
| List of integers that force collision on std::unordered_set. | |
| std::string | tgen::misc::gen_parenthesis (int size) |
| Generates a random valid parenthesis sequence. | |
Miscellaneous generation.
|
inline |
Generates a random valid parenthesis sequence.
| size | Size of the sequence. |
Generates a uniformly random parenthesis sequence.
O(size).
|
inline |
List of integers that force collision on std::unordered_set.
| size | Size of the list. |
Creates hack for both std::unordered_set and std::unordered_map, forcing quadratic behavior. The hack might not be effective due to differences in C++ implementations.
O(size).