This could either be a dumb question or its a bug in the code.
In the solution, we use a class LRUcache
templated with <size_t capacity>
template <size_t capacity>
class LRUCache
{
// blah blah blah
};
We use this capacity later in a function.
But this capacity is never stored as part of a member variable or anywhere else.
I was expecting a parameterized constructor which would store this capacity as a member variable so that it could be used in functions.
How can we access this, assuming here only default constuctor of LRUCache gets invoked?
Is there something special about size_t?