1、
??
Recover Binary Search Tree
Two elements of a binary search tree (BST) are swapped by mistake.
Recover the tree without changing its structure.
Note:
A solution using O(n) space is pretty...
分类:
其他好文 时间:
2014-06-20 10:13:49
阅读次数:
243
/验证规则详细配置 public function rules() { // NOTE: you
should only define rules for those attributes that // will receive user inputs.
...
分类:
其他好文 时间:
2014-06-11 10:05:03
阅读次数:
180
The paper "Optimal Decoding of Linear Codes for
Minimizing Symbol Error Rate", which is the source of the BCJR decoding
algorithm, is my current obje....
分类:
其他好文 时间:
2014-06-11 07:35:20
阅读次数:
250
【题目】
Follow up for problem "Populating Next Right Pointers in Each Node".
What if the given tree could be any binary tree? Would your previous solution still work?
Note:
You may only use constant extra space.
For example,
Given the following binary tre...
分类:
其他好文 时间:
2014-06-08 15:46:22
阅读次数:
303
【题目】
Given an index k, return the kth row of the Pascal's triangle.
For example, given k = 3,
Return [1,3,3,1].
Note:
Could you optimize your algorithm to use only O(k) extra space?
【题意】
给定行索引k, k从0开始,返回该索引指向的杨辉三角的行
要求只能使用O(k)的额外空间
【思路】
...
分类:
其他好文 时间:
2014-06-08 15:46:02
阅读次数:
272
题目
Two elements of a binary search tree (BST) are swapped by mistake.
Recover the tree without changing its structure.
Note:
A solution using O(n)
space is pretty straight forward. Cou...
分类:
其他好文 时间:
2014-06-08 15:32:45
阅读次数:
245
TinyXML中主要class的类图:
文档类代表一个XML文档,通过它,你可以载入、输出和保存文档。
载入文档:
TiXmlDocument doc("note.xml");
doc.LoadFile();
输出文档:
TiXmlDocument doc("note.xml");
doc.LoadFile();
doc.Print();...
分类:
其他好文 时间:
2014-06-08 15:16:22
阅读次数:
717
Note: 学习方法固然重要,但更重要的是选择更好的学习方法,学习材料!背景介绍:01
Java考古学02 Java创世纪03 Java基本概念104 Java的变量05 Java的基本数据模型
分类:
移动开发 时间:
2014-06-08 07:12:19
阅读次数:
185
Single NumberGiven an array of integers, every
element appearstwiceexcept for one. Find that single one.Note:Your algorithm
should have a linear runti...
分类:
其他好文 时间:
2014-06-07 23:44:39
阅读次数:
302
Given amxngrid filled with non-negative
numbers, find a path from top left to bottom right whichminimizesthe sum of all
numbers along its path.Note:Yo...
分类:
其他好文 时间:
2014-06-07 20:22:17
阅读次数:
264