loop further adds the elements of list2 with their counts into the hmap
while ( n2 != null ) { if ( hmap . ContainsKey ( n2 . data ) ) { hmap [ n2 . data ] ++ ; } else { hmap [ n2 . data ] = 1 ; } n2 = n2 . next ; }