自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 收藏
  • 关注

原创 73. Set Matrix Zeroes[medium

73. Set Matrix Zeroes题目:Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.题解:O(m+n)的方法是容易想到的,而空间复杂度O(1),只要利用原矩阵的一行和一列来使用O(m+n)的方法就行了。

2017-07-08 13:49:06 103

原创 leetcode 题解 91. Decode Ways[medium

题目:A message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message containing digits, determine the t

2017-07-08 13:39:27 129

原创 103. Binary Tree Zigzag Level Order Traversal[medium]

题目:Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and alternate between).For example:Given

2017-07-08 13:05:34 118

原创 leetcode题解 132. Palindrome Partitioning II[hard]

题目:Given a string s, partition s such that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning of s.For example, given s = "aab",

2017-07-08 12:41:29 135

原创 [LeetCode] 3Sum 三数之和[medium]

[LeetCode] 3Sum 三数之和 Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.No

2017-05-15 15:58:07 98

原创 151.Reverse Words in a String[medium]

Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Update (2015-02-12):For C programmers: Try to solve it in-place in

2017-04-25 21:36:08 107

151. Reverse Words in a String[medium]

Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Update (2015-02-12):For C programmers: Try to solve it in-place in

2017-04-24 16:54:50 72

LeetCode 151. Reverse Words in a String [string][medium]

Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Update (2015-02-12):For C programmers: Try to solve it in-place in

2017-04-16 07:56:28 73

LeetCode 151. Reverse Words in a String [string][medium]

Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Update (2015-02-12):For C programmers: Try to solve it in-place in

2017-04-16 02:18:07 68

原创 [编程题] 最大和

在一个N*N的数组中寻找所有横,竖,左上到右下,右上到左下,四种方向的直线连续D个数字的和里面最大的值 输入描述:每个测试输入包含1个测试用例,第一行包括两个整数 N 和 D :3 <= N <= 1001 <= D <= N接下来有N行,每行N个数字d:0 输出描述:输出一个整数,表示找到的和的最大值输入例子:4 287 98 79 61

2017-04-07 03:05:28 185

原创 [编程题] 字符串编码

给定一个字符串,请你将字符串重新编码,将连续的字符替换成“连续出现的个数+字符”。比如字符串AAAABCCDAA会被编码成4A1B2C1D2A。 输入描述:每个测试输入包含1个测试用例每个测试用例输入只有一行字符串,字符串只包括大写英文字母,长度不超过10000。输出描述:输出编码后的字符串输入例子:AAAABCCDAA输出例子:4

2017-04-06 22:50:17 142

原创 LeetCode 495. Teemo Attacking [tag:Array][difficulty:Medium]

题目介绍In LLP world, there is a hero called Teemo and his attacking can make his enemy Ashe be in poisoned condition. Now, given the Teemo's attacking ascending time series towards Ashe and the poiso

2017-03-02 14:13:31 143

LeetCode 495. Teemo Attacking (Tag:Array; Difficulty: Medium)

题目 : In LLP world, there is a hero called Teemo and his attacking can make his enemy Ashe be in poisoned condition. Now, given the Teemo's attacking ascending time series towards Ashe and the pois

2017-03-02 11:51:25 79

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除