human
Count pair of strings whose concatenation has every vowel | Function to return the count of all concatenated string with each vowel at least once.
Concatenating all possible pairs of string.
Creating an array which checks , the presence of each vowel.
Checking for each vowel by traversing the concatenated string.
Checking if all the elements are set in vowel [ ].
Check if all vowels are present or not.
Return the final count.
Driver Code.
Given array of strings.
Function call"
Solution in Python:
 ... Can you provide a code to count pair of strings whose concatenation has every vowel and the other steps required?
assistant
#Here is code to count pair of strings whose concatenation has every vowel and the other steps required.
 def good_pair ( st , N ) :
	countStr = 0
	for i in range ( N ) :
		for j in range ( i + 1 , N ) :
			res = st [ i ] + st [ j ]
			vowel = [ 0 ] * 5
			for k in range ( len ( res ) ) :
				if ( res [ k ] == ' a ' ) :
					vowel [ 0 ] = 1
				elif ( res [ k ] == ' e ' ) :
					vowel [ 1 ] = 1
				elif ( res [ k ] == ' i ' ) :
					vowel [ 2 ] = 1
				elif ( res [ k ] == ' o ' ) :
					vowel [ 3 ] = 1
				elif ( res [ k ] == ' u ' ) :
					vowel [ 4 ] = 1
			temp = 0
			for ind in range ( 5 ) :
				if ( vowel [ ind ] == 1 ) :
					temp += 1
			if ( temp == 5 ) :
				countStr += 1
	return countStr
if __name__ == " _ _ main _ _ " :
	arr = [ " aaweiolkju " , " oxdfgujkmi " ]
	N = len ( arr )
	print ( good_pair ( arr , N ) )