> this->table = (TableItems<K, V>*)malloc(this->capacity * sizeof(TableItems<K, V>));
Do NOT use malloc in a C++ program.
malloc doesn't call constructors, new does.
You 'get away with it' with PoD types like int, because it basically doesn't matter.
But complex types (anything with it's own constructor), you lose.
So do this. table = new TableItems<K, V>[capacity];
Also, you don't need this-> in front of everything unless you have some kind of name clash to resolve.
TableItems does not have a constructor, so line 21 calls the implicitly defined default constructor, which is the same as a constructor with an empty body and an empty initialiser list. So table is an array filled with uninitialised items. If you initialise them later, the first initialisation is a waste of CPU time.
Both of the classes are not RAII compliant: why not have a std::vector<TableItems*> , then you won't have that problem? If TableItems had a constructor that initialised K and V, you could use emplace_back to fill the vector. Otherwise, if using new, provide destructors.
Line 20 has implicit conversions (long long , int), why not use std::size_t ?