human
Find the largest Alphabetic character present in the string | Function to find the Largest Alphabetic Character.
Array for keeping track of both uppercase and lowercase english alphabets.
Iterate from right side of array to get the largest index character.
Check for the character if both its uppercase and lowercase exist or not.
Return - 1 if no such character whose uppercase and lowercase present in string str.
Driver code"
Solution in Python:
assistant
#Here is code to find the largest Alphabetic character present in the string and the other steps required.
 def largestCharacter ( str ) :
	uppercase = [ False ] * 26
	lowercase = [ False ] * 26
	arr = list ( str )
	for c in arr :
		if ( c . islower ( ) ) :
			lowercase [ ord ( c ) - ord ( ' a ' ) ] = True
		if ( c . isupper ( ) ) :
			uppercase [ ord ( c ) - ord ( ' A ' ) ] = True
	for i in range ( 25 , - 1 , - 1 ) :
		if ( uppercase [ i ] and lowercase [ i ] ) :
			return chr ( i + ord ( ' A ' ) ) + " "
	return " - 1"
str = " admeDCAB "
print ( largestCharacter ( str ) )