DataArt interview question

The algorithm of adding new object into HashMap