LTIMindtree Interview Question

How to avoid hash collision in java