亚麻电面

有八年工作经验以及 PhD in CS Top 50 CS school
地点是 Palo Alto, CA

A very dry phone interview with the following question:
Given a 2D (MxN) matrix, find all the sub-matrices that sum to a target value.
Example:
Input:
3x4 matrix: [ [1 -1 0 1], [2 1 4 -11], [-3 1 3 4]]
target is 0.

output: [1 -1], [1 -1 0], [-1 0 1], [1 2 -3], [-1 1], [[4 -11], [3 4]]