human
Number of permutations of a string in which all the occurrences of a given character occurs together | Function to return factorial of the number passed as argument.
Function to get the total permutations which satisfy the given condition.
Create has to store count of each character.
Store character occurrences.
Count number of times Particular character comes.
If particular character isn 't  present in the string then return 0.
Remove count of particular character.
Total length of the string.
Assume all occurrences of particular character as a single character ..
Compute factorial of the length.
Divide by the factorials of the no . of occurrences of all the characters ..
return the result.
Driver code.
Assuming the string and the character are all in uppercase"
Solution in Python:
 Write me a code to number of permutations of a string in which all the occurrences of a given character occurs together and the other steps required?
assistant
#Here is code to number of permutations of a string in which all the occurrences of a given character occurs together and the other steps required.
 def fact ( n ) :
	result = 1
	for i in range ( 1 , n + 1 ) :
		result *= i
	return result
def getResult ( string , ch ) :
	has = [ 0 ] * 26
	for i in range ( len ( string ) ) :
		has [ ord ( string [ i ] ) - ord ( ' A ' ) ] += 1
	particular = has [ ord ( ch ) - ord ( ' A ' ) ]
	if particular == 0 :
		return 0
	has [ ord ( ch ) - ord ( ' A ' ) ] = 0
	total = len ( string )
	total = total - particular + 1
	result = fact ( total )
	for i in range ( 26 ) :
		if has [ i ] > 1 :
			result /= fact ( has [ i ] )
	return result
if __name__ == " _ _ main _ _ " :
	string = " MISSISSIPPI "
	print ( getResult ( string , ' S ' ) )