https://oj.leetcode.com/problems/trapping-rain-water/模拟题,计算出在凹凸处存水量。对于一个位置 i ,分别计算出它左边的最大值 left (从左扫描一遍), 右边的最大值 right(从右扫描一遍) 。找left right中的最小值,如果大于 ...
分类:
移动开发 时间:
2014-06-28 16:32:30
阅读次数:
222
You are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb...
分类:
其他好文 时间:
2014-06-24 10:22:48
阅读次数:
214
华文细黑:STHeiti Light [STXihei]华文黑体:STHeiti华文楷体:STKaiti华文宋体:STSong华文仿宋:STFangsong俪黑 Pro:LiHei Pro Medium俪宋 Pro:LiSong Pro Light标楷体:BiauKai苹果俪中黑:Apple LiG...
分类:
Web程序 时间:
2014-06-24 09:45:17
阅读次数:
269
-----------------------钦定版《圣经》-----------------------chapter 4The King James Bible or light there belight reading In 1611 'the powers that be' turnedt...
分类:
其他好文 时间:
2014-06-18 21:03:08
阅读次数:
444
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ...
分类:
其他好文 时间:
2014-06-18 13:29:31
阅读次数:
214
原题如下,意思就是说无序数组(由0,1,2组成),一遍扫描,把数组整理成0,1,2这样的序列。
Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red,...
分类:
其他好文 时间:
2014-06-18 07:12:43
阅读次数:
174
1、
??
Reverse Linked List II
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....
分类:
其他好文 时间:
2014-06-17 23:03:12
阅读次数:
257
献上代码C++代码,仅供参考。若使用Delphi,请参考文献,http://blogs.embarcadero.com/davidi/2013/12/02/43032/
一定记得要要在FireMonkey哦。否则没有Fmx的库文件在里面。
//--------------------------------------------------------------------------...
分类:
编程语言 时间:
2014-06-17 22:22:56
阅读次数:
392
/*声明一个类模板,利用它分别实现两个整数.
浮点数和字符的比较,求出大数和小数。
说明:在类模板外定义各成员函数。
输入两个整数、两个浮点数和两个字符
从大到小输出两个整数、两个浮点数和两个字符
*/
#include
#include
using namespace std;
template
class Compare
{
public:
Compare...
分类:
其他好文 时间:
2014-06-17 19:08:27
阅读次数:
266
1、
??
Binary Tree Inorder Traversal
Given a binary tree, return the inorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return ...
分类:
其他好文 时间:
2014-06-14 14:11:27
阅读次数:
315