LeetCode 485 Max Consecutive Ones 解题报告
摘要:
题目要求 Given a binary array, find the maximum number of consecutive 1s in this array. 题目分析及思路 给定一个01数组,要求找到这个数组中连续1的最大长度。可以考虑0的位置,结合数组切片,循环进行。要记得把最后数组的长 阅读全文
posted @ 2019-03-24 09:58
锋上磬音
阅读(111)
评论(0)
推荐(0)