Print the count
System . out . print ( cnt + " ▁ " ) ; } } static int upper_bound ( List < Integer > freq , int f ) { int low = 0 , high = freq . size ( ) - 1 ; while ( low < high ) { int mid = ( low + high ) / 2 ; if ( freq . get ( mid ) > f ) high = mid ; else low = mid + 1 ; } return ( freq . get ( low ) < f ) ? low ++ : low ; }