原题地址:https://oj.leetcode.com/problems/jump-game-ii/题意:Given
an array of non-negative integers, you are initially positioned at the first
index of the ...
分类:
编程语言 时间:
2014-06-12 17:38:49
阅读次数:
323
Reverse Linked List IIReverse a linked list from
positionmton. Do it in-place and in one-pass.For example:Given
1->2->3->4->5->NULL, m= 2 andn= 4,retu...
分类:
其他好文 时间:
2014-06-12 07:03:54
阅读次数:
308
题目
Reverse a linked list from position m to n. Do it in-place and in one-pass.
For example:
Given 1->2->3->4->5->NULL, m = 2 and n =
4,
return 1->4->3->2->5->NULL.
Note:
Given m,...
分类:
其他好文 时间:
2014-06-11 06:07:11
阅读次数:
392
移除数组中重复次数超过2次以上出现的数,但是可以允许重复2次。
这个题类似Remove Duplicates from Sorted Array,第一个想法很直接就是计数,超过2次的就忽略,依据这个思路的代码见代码一;
上面的思路可行,但是代码看着比较冗余,判断比较多。再来想想原来的数组,该数组是排好序的,如果一个数出现3次以上,那么必有A[i] == A[i-2]。所以根据这个关系可以写出比较精简的代码二。详见代码。...
分类:
其他好文 时间:
2014-06-10 19:18:39
阅读次数:
250
题目
Follow up for "Unique Paths":
Now consider if some obstacles are added to the grids. How many unique paths would there be?
An obstacle and empty space is marked as 1 and 0 respective...
分类:
其他好文 时间:
2014-06-10 18:28:49
阅读次数:
207
ACM 卡特兰数 Train Problem II hdu1023 大数乘法(存五位数)...
分类:
其他好文 时间:
2014-06-10 15:51:06
阅读次数:
179
Gopher IITime Limit:2000MSMemory Limit:65536KTotal
Submissions:6345Accepted:2599DescriptionThe gopher family, having averted the
canine threat, must f...
分类:
其他好文 时间:
2014-06-10 10:30:00
阅读次数:
218
ThermalLabel SDK for .NET
条形码控件是一个用VB.NET或C#开发的纯.NET的一个类库(DLL), 可用该组件来设计条码并在Zebra Thermal Printer(任何支持ZPL?
or ZPL II? 语言/仿真程序的打印机)上打印这些条码。ThermalLabel...
分类:
其他好文 时间:
2014-06-09 16:46:36
阅读次数:
334