human
Longest sub | Function to return the length of the longest sub - array whose product of elements is 0.
Driver code"
Solution in Python:
 ... Can you provide a code to longest sub and the other steps required?
assistant
#Here is code to longest sub and the other steps required.
 def longestSubArray ( arr , n ) :
	isZeroPresent = False
	for i in range ( 0 , n ) :
		if ( arr [ i ] == 0 ) :
			isZeroPresent = True
			break
	if ( isZeroPresent ) :
		return n
	return 0
arr = [ 1 , 2 , 3 , 0 , 1 , 2 , 0 ]
n = len ( arr )
print ( longestSubArray ( arr , n ) )