why p=1 and p=(p*27)%table_size
Hashfunction insert
hello @Prakhar2810
we are multiplying each charcater of key with the power of 27.
thats is why we started from p=1 and then in each iteration we r multiplying with 27.
so basically p will take value -> 27^0 , 27^1 ,27^2 , 27^3 … so on
we r taking mod with table size to avoid overflow
please dry run this insert function
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.
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.