Rehash implementation doubt

Why is my code not working properly? The table size increases but the collisions don’t get taken care of.

@akankshaanand99
It’s working perfectly fine. You are just not seeing the collision handling because you are running it with a small sample size. Add some more inserts and watch it handle the collisions.
Or alternatively , you could declare the rehash() function as public for testing purposes. And then call it from the main() explicitly and watch it increase the size and handle the collisions.

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.