Search for upperbound of ( cSum - K ) in the hashmap
ArrayList < Integer > list = new ArrayList < Integer > ( ) ; list . addAll ( sumSet ) ; int it = Integer . MIN_VALUE ; for ( int e : list ) if ( e >= ( curSum - k ) ) { it = e ; break ; }