一种可行的算法: 由于属性泛化后,一个泛化的假设可以对应多个具体假设。 把所有假设按三属性泛化,二属性泛化,一属性泛化,具体属性排序(这样可以保证排在后面的假设不会包含前面的任何一个假设,所以省略了一些包含判断),进行循环枚举,按顺序遍历所有假设组合248种可能(当然绝大部分都提前结束了,不会是那么 ...
分类:
其他好文 时间:
2018-03-04 15:59:51
阅读次数:
180
Given a binary tree, return the postorder traversal of its nodes' values. For example:Given binary tree [1,null,2,3], ...
分类:
其他好文 时间:
2018-03-03 20:32:51
阅读次数:
137
1138. Postorder Traversal (25) 时间限制 600 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue 时间限制 600 ms 时间限制 600 ms 内存限制 65536 kB 内存限制 65536 kB ...
分类:
其他好文 时间:
2018-03-02 14:47:42
阅读次数:
189
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. F ...
分类:
其他好文 时间:
2018-02-28 10:40:21
阅读次数:
136
转载:从源代码的角度分析--在BaseAdapter调用notifyDataSetChanged()之后发生了什么 利用Adapter作为ListView的适配器,为ListView提供数据。选中某一项后,要让这一项变成选中状态,也就是背景图片要换一下。下面我就用一个小例子来模拟。重点不在于实现,而 ...
分类:
其他好文 时间:
2018-02-24 20:47:52
阅读次数:
198
Android面试收集录11 Window+Activity+DecorView+ViewRoot之间的关系 ...
分类:
移动开发 时间:
2018-02-20 19:21:19
阅读次数:
279
[抄题]: 给定二叉树,返回其节点值的垂直遍历顺序。 (即逐列从上到下)。如果两个节点在同一行和同一列中,则顺序应 从左到右。 给定一个二叉树 {3,9,20,#,#,15,7} 返回垂直遍历顺序:[[9],[3,15],[20],[7]] 给定一个二叉树 {3,9,20,#,#,15,7} 返回垂 ...
分类:
其他好文 时间:
2018-02-18 21:29:44
阅读次数:
254
[抄题]: [暴力解法]: 时间分析: 空间分析: [思维问题]: [一句话思路]: [输入量]:空: 正常情况:特大:特小:程序里处理到的特殊情况:异常情况(不合法不合理的输入): [画图]: [一刷]: [二刷]: [三刷]: [四刷]: [五刷]: [五分钟肉眼debug的结果]: [总结]: ...
分类:
其他好文 时间:
2018-02-18 17:05:16
阅读次数:
184
地址: http://lintcode.com/zh-cn/problem/binary-tree-level-order-traversal/ 借助队列来完成 http://lintcode.com/zh-cn/problem/binary-tree-level-order-traversal-i ...
分类:
其他好文 时间:
2018-02-11 12:24:43
阅读次数:
109