- 博客(4)
- 收藏
- 关注
原创 leetcode(363):Max Sum of Rectangle No Larger Than K
【原题】 题目链接Max Sum of Rectangle No Larger Than KGiven 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: Given
2016-12-24 00:37:03 402
原创 leetcode(410):Split Array Largest Sum
【原题】 Given an array which consists of non-negative integers and an integer m, you can split the array into m non-empty continuous subarrays. Write an algorithm to minimize the largest sum among these
2016-12-21 23:31:56 402
原创 leetcode[52]:N-Queens II
【原题】 Follow up for N-Queens problem. Now, instead outputting board configurations, return the total number of distinct solutions.【分析】 本题为N皇后问题,要求解的个数 思路是回溯法,一行一行地遍历,每个位置试一下,看能否构成解。 由题目要求,同一行、同一列
2016-12-21 14:33:38 365
原创 leetcode(51):N-Queens
【原题】 The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an integer n, return all distinct solutions to the n-queens puzzle.Ea
2016-12-21 12:01:01 283
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人