I have a doubt regarding this algorithm if we encounter the value of m.count(hd)==1 means there is already a value inside the map which having the same hd . i want to confirm that in that case we are not pushing the value having same hd into the map?