码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2017-05-24 21:04:05      阅读:141      评论:0      收藏:0      [点我收藏+]

标签:tco   etc   long   line   not   nal   code   horizon   hint   

 

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

标签:tco   etc   long   line   not   nal   code   horizon   hint   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!