is it ok just to implement a hash table without that collision logic?
@Vandana.Teaching16 күн бұрын
Hello.. Collision solution is also implemented in this code. while(ht[index] != -1) { index = (index + 1) % m; } In this, when the index value is not equal to -1 , it means that some element is already present here. so it checks if the next location ie., index+1 is free or not, if free then the next value gets stored here.
@Vandana.Teaching16 күн бұрын
I hope its clear now
@arunv766917 күн бұрын
what about collision mam?
@Vandana.Teaching16 күн бұрын
Its implemented.
@arunv766916 күн бұрын
@@Vandana.Teaching ok mam i was asking about the print statement, collision detected, do u want to continue.
@arunv766916 күн бұрын
In exam if i implement the same code as u provided will they consider.
@vandanau263616 күн бұрын
@@arunv7669 Since it only says that you need to handle collison . So I have not written a separate print statement.
@vandanau263616 күн бұрын
Yes bcoz it says internal handling of Collisions only..