
leetcode-java
本_被占用
这个作者很懒,什么都没留下…
展开
-
363. Max Sum of Rectangle No Larger Than K
原网址Given a non-empty 2D matrix matrix and an integer k, find the max sum of a rectangle in the matrix such that its sum is no larger than k.Example matrix = [ [1, 0, 1], [0, -2, 3] ]原创 2017-03-17 12:51:48 · 277 阅读 · 0 评论 -
560. Subarray Sum Equals K leetcode
这道题,BF 时间复杂度O(n^2)public static int subarraySum(int[] nums, int k) { long [][] map = new long [nums.length+1][nums.length+1]; long[] odd = new long[nums.length+1]; long[] even =原创 2017-05-11 22:46:51 · 837 阅读 · 0 评论