As is evident I am new to c++ programming. But reading about the segmentation fault atleast I know it might occur due to accessing array element out of it's size. But here I am unable to figure out where is the problem. After 199th iteration in contains function, this segmentation fault error is thrown up. Any suggestions would be very helpful
I figured out the problem. My hash function was giving a negative value to the insert function and array index cannot be negative. Hence the segmentation fault.