自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

马德里小铁匠的铁匠铺

悔恨会磨平你灵魂中的棱角。

  • 博客(7)
  • 资源 (4)
  • 收藏
  • 关注

原创 LeetCode 316. Remove Duplicate Letters

题目Given a string which contains only lowercase letters, remove duplicate letters so that every letter appear once and only once. You must make sure your result is the smallest in lexicographical order

2017-02-07 19:26:19 296

原创 LeetCode 282. Expression Add Operators

题目Given a string that contains only digits 0-9 and a target value, return all possibilities to add binary operators (not unary) +, -, or * between the digits so they evaluate to the target value.Exampl

2017-02-07 18:42:24 320

原创 LeetCode 164. Maximum Gap

题目Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/space.Return 0 if the array contains less than 2 elements.You ma

2017-02-05 12:45:44 271

原创 LeetCode 99. Recover Binary Search Tree

题目Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note: A solution using O(n) space is pretty straight forward. Could you devise a con

2017-02-05 11:52:14 397

原创 LeetCode 327. Count of Range Sum

题目Given an integer array nums, return the number of range sums that lie in [lower, upper] inclusive. Range sum S(i, j) is defined as the sum of the elements in nums between indices i and j (i ≤ j), in

2017-02-05 11:20:46 481

原创 LeetCode 25. Reverse Nodes in k-Group

给一个链表,每k个反转一下,最后不够的不反转。 写了半天,实在是太弱了。 struct XNode{ ListNode *t1, *t2; int flag; };class Solution {public: XNode dfs( ListNode* pre, ListNode* nows, int cnt, int k ){ //if( nows =

2017-02-04 14:32:04 289

原创 Leetcode 330. Patching Array

解法真的厉害!学习了!这道题给我们一个有序的正数数组nums,又给了我们一个正整数n,问我们最少需要给nums加几个数字,使其能组成[1,n]之间的所有数字,注意数组中的元素不能重复使用。我们定义一个变量miss,用来表示[0,n]之间最小的不能表示的值,那么初始化为1。那么此时我们能表示的范围是[0, miss),表示此时我们能表示0到miss-1的数,如果此时的num <= miss,那么我们可

2017-02-03 21:53:16 536

算法导论及课后习题与思考题答案

算法导论及课后习题与思考题答案 特别清晰,欢迎下载

2013-07-20

C++编程思想[第二卷]

C++编程思想[第1卷]的pdf,个人觉得还是比较清晰的,欢迎下载

2013-07-20

空空如也

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

TA关注的人

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