human
Give me a code to maximum distinct lowercase alphabets between two uppercase and the other steps required given the following:
Maximum distinct lowercase alphabets between two uppercase | Function which computes the maximum number of distinct lowercase alphabets between two uppercase alphabets.
Ignoring lowercase characters in the beginning ..
We start from next of first capital letter and traverse through remaining character ..
If character is in uppercase ,.
Update maximum count if lowercase character before this is more ..
clear the set.
If character is in lowercase.
Driver Code"
Solution in Python:
assistant
#Here is code to maximum distinct lowercase alphabets between two uppercase and the other steps required.
 def maxLower ( str ) :
	n = len ( str ) ;
	i = 0 ;
	for i in range ( n ) :
		if ( str [ i ] >= ' A ' and str [ i ] <= ' Z ' ) :
			i += 1 ;
			break ;
	maxCount = 3 ;
	s = set ( )
	for i in range ( n ) :
		if ( str [ i ] >= ' A ' and str [ i ] <= ' Z ' ) :
			maxCount = max ( maxCount , len ( s ) ) ;
			s . clear ( ) ;
		if ( str [ i ] >= ' a ' and str [ i ] <= ' z ' ) :
			s . add ( str [ i ] ) ;
			return maxCount ;
if __name__ == ' _ _ main _ _ ' :
	str = " zACaAbbaazzC " ;
	print ( maxLower ( str ) ) ;