Leetcode之Max Consecutive Ones 問題

問題描述: Given a binary array, find the maximum number of consecutive 1s in this array. 示例: Input: [1,1,0,1,1,1] Output: 3 Explanation: The first two digits or the last three digits are consecutive 1s.  
相關文章
相關標籤/搜索