自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 [LeetCode]28. Implement strStr()

Problem DescriptionImplement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. [https://leetcode.com/problems/implement-strstr/]思路其实不用K

2016-02-29 21:03:10 232

原创 [LeetCode]297. Serialize and Deserialize Binary Tree

Problem DescriptionSerialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitted across a network con

2016-02-23 19:43:36 269

原创 [LeetCode]73. Set Matrix Zeroes

Problem DescriptionGiven a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. https://leetcode.com/problems/set-matrix-zeroes/思路如果要用O(1)的额外空间的话,利用数组第0列和第0行来记录0的位置就好了

2016-02-23 15:13:49 241

原创 [LeetCode]198. House Robber

Problem DescriptionYou are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is t

2016-02-21 18:16:00 345

原创 [LeetCode]306. Additive Number

Problem DescriptionAdditive number is a string whose digits can form additive sequence.A valid additive sequence should contain at least three numbers. Except for the first two numbers, each subsequent

2016-02-21 17:45:01 399

原创 [LeetCode]86. Partition List

Problem DescriptionGiven a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.You should preserve the original relative order of the no

2016-02-21 14:54:00 280

原创 [LeetCode]129. Sum Root to Leaf Numbers

Problem DescriptionGiven a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-leaf path 1->2->3 which represents the number 123.Find

2016-02-13 19:55:24 220

原创 [LeetCode]142. Linked List Cycle II

Problem DescriptionGiven a linked list, return the node where the cycle begins. If there is no cycle, return null.Note: Do not modify the linked list.Follow up: Can you solve it without using extra s

2016-02-13 10:13:32 193

原创 [LeetCode]11. Container With Most Water

Problem DescriptionGiven n non-negative integers a1, a2, …, an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (

2016-02-13 07:54:29 220

原创 [LeetCode]53. Maximum Subarray

Problem DescriptionFind the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [−2,1,−3,4,−1,2,1,−5,4], the contiguous subarray

2016-02-10 22:11:31 256

原创 [LeetCode]199. Binary Tree Right Side View

Problem DescriptionGiven a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.

2016-02-10 21:52:53 305

原创 [LeetCode]324. Wiggle Sort II

Problem DescriptionGiven an unsorted array nums, reorder it such that nums[0] < nums[1] > nums[2] < nums[3]….

2016-02-10 21:31:13 1500

原创 [LeetCode]17. Letter Combinations of a Phone Number

Problem DescriptionGiven a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephone buttons) is given below.

2016-02-09 21:46:54 265

原创 PriorityQueue源码及用法

PriorityQueue

2016-02-09 07:53:53 311

原创 [LeetCode]141. Linked List Cycle

Problem DescriptionGiven a linked list, determine if it has a cycle in it.Follow up: Can you solve it without using extra space? [https://leetcode.com/problems/linked-list-cycle/]

2016-02-09 07:13:52 230

原创 *[LeetCode]332. Reconstruct Itinerary

Problem DescriptionGiven a list of airline tickets represented by pairs of departure and arrival airports [from, to], reconstruct the itinerary in order. All of the tickets belong to a man who departs

2016-02-09 06:38:15 1424

原创 [LeetCode]39. Combination Sum

39. Combination Sum

2016-02-08 16:24:53 371

原创 [LeetCode]204. Count Primes

Problem DescriptionCount the number of prime numbers less than a non-negative number, n. [https://leetcode.com/problems/count-primes/]

2016-02-07 19:59:33 212

原创 [LeetCode]273. Integer to English Words

Problem DescriptionConvert a non-negative integer to its english words representation. Given input is guaranteed to be less than 231 - 1.

2016-02-07 18:13:31 205

原创 [LeetCode]1. Two Sum

Problem DescriptionGiven an array of integers, find two numbers such that they add up to a specific target number.

2016-02-06 10:06:34 264

原创 [LeetCode]74. Search a 2D Matrix

Problem DescriptionWrite an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted from left to right.

2016-02-05 23:12:01 197

原创 [LeetCode]Codes of Easy Problem

[LeetCode]Code of Easy Problem

2016-02-05 22:05:07 593

原创 [LeetCode]179. Largest Number

Problem DescriptionGiven a list of non negative integers, arrange them such that they form the largest number. For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330.

2016-02-05 14:35:41 287

原创 [LeetCode]113. Path Sum II

Problem DescriptionGiven a binary tree and a sum, find all root-to-leaf paths where each path’s sum equals the given sum. [https://leetcode.com/problems/path-sum-ii/]

2016-02-04 21:29:45 213

原创 [LeetCode]152. Maximum Product Subarray

Problem DescriptionFind the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,-2,4], the contiguous subarray [2,3]

2016-02-04 18:52:24 234

原创 [LeetCode]Q3. Longest Substring Without Repeating Characters

[LeetCode]Q3. Longest Substring Without Repeating CharactersProblem DescriptionGiven a string, find the length of the longest substring without repeating characters. For example, the longest substring

2016-02-04 11:30:35 264

空空如也

空空如也

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

TA关注的人

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