首页 > 其他 > 详细

[LeetCode] Longest Line of Consecutive One in Matrix 矩阵中最长的连续1

时间:2017-05-24 20:46:43      阅读:617      评论:0      收藏:0      [点我收藏+]

 

Given a 01 matrix M, find the longest line of consecutive one in the matrix. The line could be horizontal, vertical, diagonal or anti-diagonal.

Example:

Input:
[[0,1,1,0],
 [0,1,1,0],
 [0,0,0,1]]
Output: 3

 

Hint: The number of elements in the given matrix will not exceed 10,000.

 

s

 

[LeetCode] Longest Line of Consecutive One in Matrix 矩阵中最长的连续1

原文:http://www.cnblogs.com/grandyang/p/6900866.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!