s****t 发帖数: 36 | 1 有两道最大submatrix的题,都在careercup里面的。不太懂。
1. Image you have a square matrix, where each cell is filled with
either black or white. Design an algorithm to find the maximum
subsquare such that all four borders are filled with black pixels.
2. Given an N*N matrix of positive and negative integers, write
code to find the sub-matrix with the largest possible sum?
有人解释一下啊。
Thanks。 | r**u 发帖数: 1567 | 2 2. check kadane's 2-D algorithm
【在 s****t 的大作中提到】 : 有两道最大submatrix的题,都在careercup里面的。不太懂。 : 1. Image you have a square matrix, where each cell is filled with : either black or white. Design an algorithm to find the maximum : subsquare such that all four borders are filled with black pixels. : 2. Given an N*N matrix of positive and negative integers, write : code to find the sub-matrix with the largest possible sum? : 有人解释一下啊。 : Thanks。
|
|