human
Check if any permutation of string is a K times repeated string | Function to check that permutation of the given string is a K times repeating String.
If length of string is not divisible by K.
Frequency Array.
Initially frequency of each character is 0.
Computing the frequency of each character in the string.
Loop to check that frequency of every character of the string is divisible by K.
Driver Code"
Solution in Python:
 ... What is a code to check if any permutation of string is a K times repeated string and the other steps required?
assistant
#Here is code to check if any permutation of string is a K times repeated string and the other steps required.
 def repeatingString ( s , n , k ) :
	if ( n % k != 0 ) :
		return False
	frequency = [ 0 for i in range ( 123 ) ]
	for i in range ( 123 ) :
		frequency [ i ] = 0
	for i in range ( n ) :
		frequency [ s [ i ] ] += 1
	repeat = n // k
	for i in range ( 123 ) :
		if ( frequency [ i ] % repeat != 0 ) :
			return False
	return True
if __name__ == ' _ _ main _ _ ' :
	s = " abcdcba "
	n = len ( s )
	k = 3
	if ( repeatingString ( s , n , k ) ) :
		print ( " Yes " )
	else :
		print ( " No " )