Implementation of hashing

Do we need to again and again write
template < typename T> whenever using it for a class

Hey @anika203a i am really sorry for late reply was solving a doubt. Can you please elaborate your doubt with an example as i am not able to get it.

Basically I’m asking do we need to declare template multiple times if its used for more than 1 class in a code or we can use same one for more number of classes the way we have declared it twice in hashing implementation once for node class and again for Hashtable class

SO what i understood is lets clear it with an example that your two classes are kind of cars like BMW or AUDi (keep it simple) so if both of these class have same property then of course there is no need of declaring template. But if their properties are different like audi or aeroplane then yes we have to declare it 2 different time like we did for node class and for hastable class too.

Okay… thank you!

IF there’s any other doubt left you can ask. If not then can i close this doubt ?

Yeah my doubt is clear now and I’ve marked it as resolved.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.