human
Count pairs in an array which have at least one digit common | Returns true if the pair is valid , otherwise false.
converting integers to strings.
Iterate over the strings and check if a character in first string is also present in second string , return true.
No common digit found.
Returns the number of valid pairs.
Iterate over all possible pairs.
Driver Code"
Solution in Python:

=====
Write me a code to count pairs in an array which have at least one digit common and the other steps required?
assistant
#Here is code to count pairs in an array which have at least one digit common and the other steps required.
 def checkValidPair ( num1 , num2 ) :
	s1 = str ( num1 )
	s2 = str ( num2 )
	for i in range ( len ( s1 ) ) :
		for j in range ( len ( s2 ) ) :
			if ( s1 [ i ] == s2 [ j ] ) :
				return True ;
	return False ;
def countPairs ( arr , n ) :
	numberOfPairs = 0
	for i in range ( n ) :
		for j in range ( i + 1 , n ) :
			if ( checkValidPair ( arr [ i ] , arr [ j ] ) ) :
				numberOfPairs += 1
	return numberOfPairs
if __name__ == " _ _ main _ _ " :
	arr = [ 10 , 12 , 24 ]
	n = len ( arr )
	print ( countPairs ( arr , n ) )