human
Count of repeating digits in a given Number | Function that returns the count of repeating digits of the given number.
Initialize a variable to store count of Repeating digits.
Initialize cnt array to store digit count.
Iterate through the digits of N.
Retrieve the last digit of N.
Increase the count of digit.
Remove the last digit of N.
Iterate through the cnt array.
If frequency of digit is greater than 1.
Increment the count of Repeating digits.
Return count of repeating digit.
Given array arr [ ].
Function call"
How can the above be solved in Python?
 Can you provide a code to count of repeating digits in a given Number and the other steps required?
assistant
#Here is code to count of repeating digits in a given Number and the other steps required.
 def countRepeatingDigits ( N ) :
	res = 0
	cnt = [ 0 ] * 10
	while ( N > 0 ) :
		rem = N % 10
		cnt [ rem ] += 1
		N = N // 10
	for i in range ( 10 ) :
		if ( cnt [ i ] > 1 ) :
			res += 1
	return res
N = 12
print ( countRepeatingDigits ( N ) )