Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree andsum =...
分类:
其他好文 时间:
2014-07-02 22:10:42
阅读次数:
262
先上一个场景的基本模版: 1 local ModelScene = class("ModelScene", function() 2 return display.newScene("ModelScene") 3 end) 4 5 function ModelScene:ctor() 6 ...
分类:
其他好文 时间:
2014-07-02 21:17:07
阅读次数:
334
Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 ...
分类:
其他好文 时间:
2014-07-02 21:13:05
阅读次数:
170
应用需求:
某些场景下我们可能面临这样的问题,在运行着的应用程序不能终止的情况下,升级某个功能(或添,或减,或修改)。在不采用CTK Plugin Framework插件系统架构的情况下这将是很困难的,我们需要停止运行程序,然后在相关代码中作出修改,然后再重新编译,再重新启动我们的程序。而如果是基于CTK Plugin Framework插件系统架构构建的系统,则很容易的实现插件...
分类:
其他好文 时间:
2014-07-02 09:23:07
阅读次数:
349
题目如下:
Slash Maze
By filling a rectangle with slashes (/) and backslashes (), youcan generate nice little mazes. Here is an example:
As you can see, paths in the maze cann...
分类:
其他好文 时间:
2014-07-02 09:07:46
阅读次数:
186
【题目】
Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".
click to show clarification.
Clarification:
What constitutes a word?
A sequence of non-space characters constitutes a word....
分类:
其他好文 时间:
2014-07-02 08:34:34
阅读次数:
170
1.析构函数不继承;派生类对象在析构时,基类析构函数的调用顺序与构造函数相反。
注:派生类对象建立时要调用基类构造函数,派生类对象删除时要调用基类析构,顺序与构造函数严格相反。
2.例子
example 1
#include
#include
class Point
{
public:
Point(double a, double b, doule c)
...
分类:
编程语言 时间:
2014-07-02 08:26:49
阅读次数:
298
例子
example 1
注:若一个基类同时派生出两个派生类,即两个派生类从同一个基类继承,那么系统将为每一个简历副本,每个派生类独立地使用自己的基类副本(比如基类中有属于自己类的静态变量等)。
#include
class Person
{
public:
person() {cout
~person() {cout
};
class Student:p...
分类:
编程语言 时间:
2014-07-02 07:50:53
阅读次数:
270
在官网下载genymotion http://www.genymotion.cn/
然后进行以下操作
1.如果本机没有virtualbox 下载一个 可以通过指令 sudo apt-get install virtualbox-qt 进行下载
2. 将下载的genymotion做以下操作
chmod +x [INSTALLER_PATH]/genymotion-[VE...
分类:
系统相关 时间:
2014-07-02 07:40:41
阅读次数:
317
判断一个二叉树是否是轴对称的是一个经典的算法问题,下面结合leetcode上的Symmetric Tree给出判断对称树的两种方法。
先看看问题描述:
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).
For example, t...
分类:
其他好文 时间:
2014-07-02 06:58:05
阅读次数:
208