- 博客(9)
- 资源 (33)
- 收藏
- 关注
原创 leetcode54 Spiral Matrix
Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.For example,Given the following matrix:[ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ]]
2015-11-25 13:47:19 276
原创 nyoj90 整数划分
整数划分时间限制:3000 ms | 内存限制:65535 KB难度:3描述将正整数n表示成一系列正整数之和:n=n1+n2+…+nk, 其中n1≥n2≥…≥nk≥1,k≥1。 正整数n的这种表示称为正整数n的划分。求正整数n的不 同划分个数。 例如正整数6有如下11种不同的划分: 6; 5+1; 4+2,4+1+1; 3+3,3
2015-11-23 12:54:13 371
原创 leetcode40 Combination Sum II
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.Each number in C may only be used once in the combina
2015-11-22 16:21:21 332
原创 leetcode39 Combination Sum
Total Accepted: 69250 Total Submissions: 238683 Difficulty: MediumGiven a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.
2015-11-22 16:19:12 273
原创 leetcode25 Reverse Nodes in k-Group
Reverse Nodes in k-GroupMy SubmissionsQuestionTotal Accepted: 47206 Total Submissions: 181287 Difficulty: HardGiven a linked list, reverse the nodes of a linked list k at a tim
2015-11-18 17:19:25 434
原创 leetcode 18 4Sum
/**Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target.Note:Elements in a qu
2015-11-11 21:15:03 262
原创 nyoj104 最大和
最大和时间限制:1000 ms | 内存限制:65535 KB难度:5描述给定一个由整数组成二维矩阵(r*c),现在需要找出它的一个子矩阵,使得这个子矩阵内的所有元素之和最大,并把这个子矩阵称为最大子矩阵。 例子:0 -2 -7 0 9 2 -6 2 -4 1 -4 1 -1 8 0 -2 其最大子矩阵为:9
2015-11-03 21:33:10 316
原创 nyoj1242 Distribution
Distribution时间限制:1000 ms | 内存限制:65535 KB难度:1描述One day , Wang and Dong in the Dubai desert expedition, discovered an ancient castle. Fortunately, they found a map of the castle.The map mark
2015-11-02 19:22:51 299
原创 leetcode29 Divide Two Integers
Divide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT.public class Solution { public int divide(int dividend, int divisor) { i
2015-11-02 15:19:15 302
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人