题目:Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space fo...
分类:
其他好文 时间:
2014-07-03 20:58:08
阅读次数:
248
Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.class Solution...
分类:
其他好文 时间:
2014-07-03 20:25:21
阅读次数:
219
Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.此题目有两种解决思路:1)递归...
分类:
其他好文 时间:
2014-07-03 20:07:01
阅读次数:
199
DOM(文档对象模型)是针对HTML和XML文档的一个API(应用程序接口)。Document类型文档的子节点虽然DOM标准规定Document节点的子节点可以是DocumentType,Element,ProcessingInstruction或Comment,但还有两个内置的访问其子节点的快捷方...
分类:
编程语言 时间:
2014-07-03 19:35:27
阅读次数:
268
Given preorder and inorder traversal of a tree, construct the binary tree.
分类:
其他好文 时间:
2014-07-03 19:16:03
阅读次数:
149
Given inorder and postorder traversal of a tree, construct the binary tree.
分类:
其他好文 时间:
2014-07-03 19:13:08
阅读次数:
187
class Solution{public: vectorpreorderTraversal(TreeNode *root) { vectorpreOrder; Traversal(root,preOrder); return preOrder; } stack st;private: voi...
分类:
其他好文 时间:
2014-07-03 10:10:24
阅读次数:
165
1. [代码]首先是借口定义 * @author xzfpublic interface MyDeque { * insert the specified element at the front of this deque if it is possible * to do so...
分类:
其他好文 时间:
2014-07-02 17:07:48
阅读次数:
237
取Sevice和directive的引用3: Grab any ServicesWe can grab a reference to any service using theinjectorfunction of element wherengAppwas defined (or grab the...
分类:
Web程序 时间:
2014-07-02 14:57:17
阅读次数:
253
我不想挑起IE与Firefox之间的争论,我只想说说Firefox浏览器有而IE里没有的一个功能,对DOM里的对象原型的扩展。 在DOM里的window、document、element、event等这些对象在Firefox(或者说Mozilla核心的浏览器)里都有与之对应的原型:Wind...
分类:
其他好文 时间:
2014-07-02 10:24:08
阅读次数:
175