A wrapper over countStrUtil ( )
static int countStr ( int n , int bCount , int cCount ) { int [ ] [ ] [ ] dp = new int [ n + 1 ] [ 2 ] [ 3 ] ; for ( int i = 0 ; i < n + 1 ; i ++ ) { for ( int j = 0 ; j < 2 ; j ++ ) { for ( int k = 0 ; k < 3 ; k ++ ) { dp [ i ] [ j ] [ k ] = - 1 ; } } } return countStrUtil ( dp , n , bCount , cCount ) ; }