human
Count of strings that can be formed using a , b and c under given constraints | n is total number of characters . bCount and cCount are counts of ' b ' and ' c ' respectively ..
Base cases.
if we had saw this combination previously.
Three cases , we choose , a or b or c In all three cases n decreases by 1..
A wrapper over countStrUtil ( ).
Driver code.
Total number of characters"
Solution in Python:

Give me a code to count of strings that can be formed using a , b and c under given constraints and the other steps required?
assistant
#Here is code to count of strings that can be formed using a , b and c under given constraints and the other steps required.
 def countStrUtil ( dp , n , bCount = 1 , cCount = 2 ) :
	if ( bCount < 0 or cCount < 0 ) :
		return 0
	if ( n == 0 ) :
		return 1
	if ( bCount == 0 and cCount == 0 ) :
		return 1
	if ( dp [ n ] [ bCount ] [ cCount ] != - 1 ) :
		return dp [ n ] [ bCount ] [ cCount ]
	res = countStrUtil ( dp , n - 1 , bCount , cCount )
	res += countStrUtil ( dp , n - 1 , bCount - 1 , cCount )
	res += countStrUtil ( dp , n - 1 , bCount , cCount - 1 )
	dp [ n ] [ bCount ] [ cCount ] = res
	return dp [ n ] [ bCount ] [ cCount ]
def countStr ( n ) :
	dp = [ [ [ - 1 for x in range ( n + 2 ) ] for y in range ( 3 ) ] for z in range ( 4 ) ]
	return countStrUtil ( dp , n )
if __name__ == " _ _ main _ _ " :
	n = 3
	print ( countStr ( n ) )