@3.46 it is said that we will create new hash table which will be double and close to prime number why??? why cant we create an table with double size why we should create table with size close to prime number ??is there any specific reason
Sir doubt in hashing
Hi Tejas,
whatever integer we extract (either from string or numbers), we take mod with table size so that entry fits into, now the emphasis on prime number is more because it is observed that taking mod a prime number actually sees comparitively less collisions = better overall time complexity!
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.