Driver code
static public void main ( String [ ] args ) { long n = 6 , k = 3 ; String str = " aacaab " ; if ( distributingBalls ( k , n , str ) ) System . out . println ( " YES " ) ; else System . out . println ( " NO " ) ; } }