自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(28)
  • 资源 (1)
  • 收藏
  • 关注

原创 欢迎使用CSDN-markdown编辑器

欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦:Markdown和扩展Markdown简洁的语法代码块高亮图片链接和图片上传LaTex数学公式UML序列图和流程图离线写博客导入导出Markdown文件丰富的快捷键快捷键加粗 Ctrl + B 斜体 Ctrl + I 引用 Ctrl

2016-07-13 11:36:26 184

原创 38. Count and Say

The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, …1 is read off as “one 1” or 11. 11 is read off as “two 1s” or 21.

2016-03-10 17:24:16 171

原创 36. Valid Sudoku

Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with the character ‘.’

2016-03-10 14:40:00 146

原创 35. Search Insert Position

Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the array.Here

2016-03-03 13:45:44 137

原创 33. Search in Rotated Sorted Array

Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm’s runtime complexity must be in the order of O(log n). If the target is not found in

2016-03-03 13:42:47 128

原创 33. Search in Rotated Sorted Array

Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).You are given a target value to search. If found in the array return its index

2016-03-03 11:36:24 153

原创 28. Implement strStr()

Implement strStr(). Returns the index of the first occurrence of needle(关键字) in haystack(字符串), or -1 if needle is not part of haystack.

2016-03-03 10:06:39 141

原创 27. Remove Element

Given an array and a value, remove all instances of that value in place and return the new length. The order of elements can be changed. It doesn’t matter what you leave beyond the new length.

2016-03-03 09:30:24 121

原创 26. Remove Duplicates from Sorted Array

Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this in place with cons

2016-03-02 17:28:45 142

原创 24. Swap Nodes in Pairs

Given a linked list, swap every two adjacent nodes and return its head.For example, Given 1->2->3->4, you should return the list as 2->1->4->3.

2016-03-02 17:07:56 144

原创 21. Merge Two Sorted Lists

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.

2016-03-02 16:09:33 216

原创 20. Valid Parentheses

Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ and ‘]’, determine if the input string is valid.

2016-03-02 15:36:05 139

原创 19 Remove Nth Node From End of List

Given a linked list, remove the nth node from the end of list and return its head.

2016-03-02 15:21:33 132

原创 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.

2016-03-02 13:32:05 164

原创 17. Letter Combinations of a Phone Number

Given a digit string, return all possible letter combinations that the number could represent.

2016-03-02 13:06:22 112

原创 16. 3Sum Closest

Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input have exactly one solution

2016-03-02 13:00:54 143

原创 15. 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.

2016-03-02 11:05:26 104

原创 14. Longest Common Prefix

Write a function to find the longest common prefix string amongst an array of strings.

2016-03-02 09:54:42 157

原创 13. Roman to Integer

Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999

2016-03-01 17:16:50 208

原创 13. Roman to Integer

Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.

2016-03-01 17:15:46 336

原创 11. Container With Most Water

Given 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 (i, 0). Find two lin

2016-03-01 15:50:50 124

原创 9. Palindrome Number

Determine whether an integer is a palindrome. Do this without extra space.hint Could negative integers be palindromes? (ie, -1) noIf you are thinking of converting the integer to string, note the rest

2016-03-01 15:43:14 142

原创 8. String to Integer (atoi)

Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input cases.N

2016-03-01 15:09:43 136

原创 7. Reverse Integer

Reverse digits of an integer.Example1: x = 123, return 321 Example2: x = -123, return -321 Have you thought about this?Here are some good questions to ask before coding. Bonus points for you if you ha

2016-03-01 14:12:47 122

原创 5. Longest Palindromic Substring

Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.codepublic class LongestPal

2016-03-01 13:58:27 132

原创 3. Longest Substring Without Repeating Characters

Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for “abcabcbb” is “abc”, which the length is 3. For “

2016-03-01 11:01:48 147

原创 2 Add Two Numbers

You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linke

2016-03-01 10:31:32 112

原创 1 Two Sum

Two SumGiven an array of integers, return [indices][5]of the two numbers such that they add up to a specific target. You may assume that each input would have [exactly][5] one solution.[Example : ][5]

2016-02-29 15:15:27 166

空空如也

空空如也

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

TA关注的人

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