算法:1.
对root的左子树做处理,让左子树的根节点作为,根节点的右子树,并让右子树作为左子树根节点的右子树的子树2. 递归遍历右子树public void
flatten(TreeNode root) { if(root==null){ return; ...
分类:
其他好文 时间:
2014-05-26 23:39:49
阅读次数:
253
原题地址:https://oj.leetcode.com/problems/copy-list-with-random-pointer/题意:A
linked list is given such that each node contains an additional random pointe...
分类:
编程语言 时间:
2014-05-26 23:16:12
阅读次数:
368
摘自:http://blog.csdn.net/myjlvzlp/article/details/84343761、批量添加元素session.insert(String
string,Object o)public void batchInsertStudent(){ List ls = n...
分类:
其他好文 时间:
2014-05-26 22:43:20
阅读次数:
239
导出excel时,我以前使用的是POI,如下:public class Test { private
void exportEXCEL(List d502s) { Field[] fields =
d502s.get(0).getClass().getDeclaredFields...
分类:
其他好文 时间:
2014-05-26 22:30:03
阅读次数:
383
代码1[cpp]view
plaincopy#include#includeclassA{public:A(){printf("A()/n");}~A(){printf("~A()/n");}A(constA&other){printf("other/n");}};intmain(){Aa;Ab(....
分类:
其他好文 时间:
2014-05-26 22:18:50
阅读次数:
382
41.android-swipelistviewSwipeListView是一个Android
List View实现,实现了自定义ListView单元格,可通过滑动来显示扩展面板。开发者可直接登陆Google
Play下载安装其Demo应用。42.greenDAOgreenDAO是一个可以帮助An...
分类:
其他好文 时间:
2014-05-26 22:00:33
阅读次数:
379
compile时提示CListCtrl没有声明,为什么这个mfc的类不能直接用?解决办法:#include
分类:
其他好文 时间:
2014-05-26 16:34:21
阅读次数:
213
模块的搜索路径:When a module namedspamis imported, the
interpreter searches for a file namedspam.pyin the current directory, and then
in the list of director...
分类:
编程语言 时间:
2014-05-26 15:09:11
阅读次数:
367
https://wiki.postgresql.org/wiki/Apt sudo nano
/etc/apt/sources.list.d/pgdg.list粘贴deb http://apt.postgresql.org/pub/repos/apt/
precise-pgdg mainctrl+o...
分类:
数据库 时间:
2014-05-26 14:20:46
阅读次数:
437
很和谐精悍的一行快排代码quicksort1。
import random
def quicksort( list ):
if list == []:
return []
else:
cut = list[0]
lesser = quicksort( [ x for x in list[1:] if x < cut ]...
分类:
其他好文 时间:
2014-05-22 22:33:19
阅读次数:
402