human
Count ways to reach the nth stair using step 1 , 2 or 3 | Returns count of ways to reach n - th stair using 1 or 2 or 3 steps ..
Driver code"
Solution in Python:
assistant
#Here is code to count ways to reach the nth stair using step 1 , 2 or 3 and the other steps required.
 def findStep ( n ) :
	if ( n == 1 or n == 0 ) :
		return 1
	elif ( n == 2 ) :
		return 2
	else :
		return findStep ( n - 3 ) + findStep ( n - 2 ) + findStep ( n - 1 )
n = 4
print ( findStep ( n ) )