自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 [LeetCode]Longest Palindromic Substring

题目描述:

2014-06-30 18:45:03 571

原创 [LeetCode]Rotate List

描述Given a list, rotate the list to the right bykplaces, wherekis non-negative.2.2 单链表 45For example: Given1->2->3->4->5->nullptrandk = 2, return 4->5->1->2->3->nullptr.分析先遍历一遍,得出链表长度len,注意k可能大于len,因此令

2014-06-27 16:52:15 454

原创 [LeetCode]Partition List

描述Given a linked list and a valuex, partition it such that all nodes less than xcome before nodes greaterthan or equal tox.You should preserve the original relative order of the nodes in each

2014-06-27 16:36:45 479

原创 [LeetCode]Reverse Linked List II

描述Reverse a linked list from positionmto n. Do it in-place and in one-pass.For example: Given1->2->3->4->5->nullptr, m= 2 andn= 4,return1->4->3->2->5->nullptr.Note: Given m, n satisfy the foll

2014-06-27 15:59:45 453

原创 [LeetCode]Single Number II

题目描述:Given an array of integers, every element appears three times except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it with

2014-06-27 15:29:08 531

原创 [LeetCode]Gray Code

题目描述:The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integer n representing the total number of bits in the code, print t

2014-06-27 11:27:45 529

原创 [LeetCode]Permutation Sequence

题目描述:The set [1,2,3,…,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in order,We get the following sequence (ie, for n = 3):"123""132""21

2014-06-27 10:38:29 883

原创 [LeetCode] Next Permutation

题目描述Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearrange it as the lowes

2014-06-26 23:35:23 749

原创 [LeetCode] Longest Consecutive Sequence

题目描述:Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given [100, 4, 200, 1, 3, 2],The longest consecutive elements sequence is [

2014-06-26 23:05:42 564

原创 [LeetCode]Longest Valid Parentheses

解题思路:

2014-06-23 14:51:57 529

原创 Combination Sum

解题思路:

2014-06-22 23:08:20 409

原创 Trapping Rain Water

解题思路我的解题思路好像是全网目前知道的唯一一个哦~~思考这题时,想到了那道 Candy 题.  那道扫描两遍.这题可不可以也扫描两遍呢?答案是可以的.从左往右以当前bar i 为左bar,直到找比它大的bar j .如果找到,就算出两者的trap water.然后令i:=j,继续搜完.从右往左同理的方式搜寻(其实就是把第一遍的每个bar当做右bar).不过这里

2014-06-22 22:54:32 542

空空如也

空空如也

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

TA关注的人

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