function mark(p, level){ if(level >3){ return ; } if(typeof p == "object" && p != null && p.marked == undefined){ p.marked = true; console.log(p); for ...
分类:
编程语言 时间:
2017-07-23 21:14:36
阅读次数:
140
Lowest Common Ancestor of a Binary Search Tree 一、题目描写叙述 二、思路及代码 二叉搜索树有个性质:左子树的值都比根节点小,右子树的值比根节点大。那么我们的思路就是递归比較。 假设输入的两个节点的值比当前节点小,说明是在当前根节点的左子树中;反之则在右 ...
分类:
其他好文 时间:
2017-07-22 14:27:09
阅读次数:
208
方法的名字和參数列表成为方法的签名。注意,方法签名不包含方法的返回类型。本文通过測试理解參数列表的真正含义,以及在继承中重写方法时方法的返回值与父类中方法的返回值应该有如何的关系。 这里有三个辅助类: package methodsign; public class Ancestor { } pac ...
分类:
编程语言 时间:
2017-07-21 22:06:15
阅读次数:
139
The rotation game uses a # shaped board, which can hold 24 pieces of square blocks (see Fig.1). The blocks are marked with symbols 1, 2 and 3, with ex ...
分类:
其他好文 时间:
2017-07-20 23:46:22
阅读次数:
303
参考:https://forum.unity3d.com/threads/animationclip-must-be-marked-as-legacy.213952/ 两个方面需要设置: 1,FBX文件内Rig需要设置 Legacy 老式 2.对应的Animaiton需要在Debug模式下设置Ani ...
分类:
编程语言 时间:
2017-07-19 14:22:54
阅读次数:
451
Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “The lowes ...
分类:
其他好文 时间:
2017-07-17 09:53:19
阅读次数:
215
https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/#/description Given a binary tree, find the lowest common ancestor (LCA) of two ...
分类:
其他好文 时间:
2017-07-09 16:18:14
阅读次数:
179
/** * Created by lvhao on 2017/7/6. * A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can o... ...
分类:
其他好文 时间:
2017-07-06 20:34:21
阅读次数:
156
本章内容还在整理上传中,你可以等全部更新完毕后再查阅也可以先预览已上传的内容。。。。。。 7. 应用层的命令模式 在上个章节里我们设计并编码了领域对象Permission,但是目前Permission并没有任何行为上的设计。这是因为我们不建议“凭空去制造行为”,而是在领域对象第一个版本的代码实现之后 ...
分类:
其他好文 时间:
2017-07-06 14:19:12
阅读次数:
149
事件传递有两种方式:冒泡与捕获。 事件传递定义了元素事件触发的顺序。 如果你将 <p> 元素插入到 <div> 元素中,用户点击 <p> 元素, 哪个元素的 "click" 事件先被触发呢? 在 冒泡 中,内部元素的事件会先被触发,然后再触发外部元素,即: <p> 元素的点击事件先触发,然后会触发 ...
分类:
其他好文 时间:
2017-07-05 00:29:15
阅读次数:
281