human
Minimum deletions from string to reduce it to string with at most 2 unique characters | Function to find the minimum deletions.
Array to store the occurrences of each characters.
Length of the string.
ASCII of the character.
Increasing the frequency for this character.
Choosing two character.
Finding the minimum deletion.
Driver code"
Solution in Python:

Write me a code to minimum deletions from string to reduce it to string with at most 2 unique characters and the other steps required?
assistant
#Here is code to minimum deletions from string to reduce it to string with at most 2 unique characters and the other steps required.
 def check ( s ) :
	fr = [ 0 ] * 26
	n = len ( s )
	for i in range ( n ) :
		x = ord ( s [ i ] )
		fr [ x - 97 ] += 1
	minimum = 99999999999
	for i in range ( 26 ) :
		for j in range ( i + 1 , 26 ) :
			z = fr [ i ] + fr [ j ]
			minimum = min ( minimum , n - z )
	return minimum
s = " geeksforgeeks "
print ( check ( s ) )