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

[LintCode] Submatrix Sum 子矩阵之和

时间:2016-08-28 00:59:36      阅读:233      评论:0      收藏:0      [点我收藏+]

标签:

 

Given an integer matrix, find a submatrix where the sum of numbers is zero. Your code should return the coordinate of the left-up and right-down number.

Example

Given matrix

[
  [1 ,5 ,7],
  [3 ,7 ,-8],
  [4 ,-8 ,9],
]

return [(1,1), (2,2)]

Challenge 

O(n3) time.

 

[LintCode] Submatrix Sum 子矩阵之和

标签:

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

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