Python Solution


  • 3
    S
    def findMaxConsecutiveOnes(self, nums):
    
        num_str = ''.join(map(str,nums))
        num_list = num_str.split('0')
        
        return len(max(num_list))

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.