human
Program to find Greatest Common Divisor ( GCD ) of N strings | Function that finds gcd of 2 strings.
If str1 length is less than that of str2 then recur with gcd ( str2 , str1 ).
If str1 is not the concatenation of str2.
GCD string is found.
Cut off the common prefix part of str1 & then recur.
Function to find GCD of array of strings.
Return the GCD of strings.
Given array of strings.
Function Call"
Solution in Python:

What is a code to program to find Greatest Common Divisor ( GCD ) of N strings and the other steps required?
assistant
#Here is code to program to find Greatest Common Divisor ( GCD ) of N strings and the other steps required.
 def gcd ( str1 , str2 ) :
	if ( len ( str1 ) < len ( str2 ) ) :
		return gcd ( str2 , str1 )
	elif ( not str1 . startswith ( str2 ) ) :
		return " "
	elif ( len ( str2 ) == 0 ) :
		return str1
	else :
		return gcd ( str1 [ len ( str2 ) : ] , str2 )
def findGCD ( arr , n ) :
	result = arr [ 0 ]
	for i in range ( 1 , n ) :
		result = gcd ( result , arr [ i ] )
	return result
arr = [ " GFGGFG " , " GFGGFG " , " GFGGFGGFGGFG " ]
n = len ( arr )
print ( findGCD ( arr , n ) )