Traverse in the open and find corresponding minimum
for ( HashMap . Entry < Integer , Integer > it : open . entrySet ( ) ) cnt += Math . min ( it . getValue ( ) , close . get ( it . getKey ( ) ) ) ; return cnt ; }