Given two integersnandk, return all possible
combinations ofknumbers out of 1 ...n.For example,Ifn= 4 andk= 2, a solution
is:[ [2,4], [3,4], [2,3],...
分类:
其他好文 时间:
2014-05-14 03:54:40
阅读次数:
250
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie
Same Tree
Total Accepted: 15922 Total
Submissions: 38418
Given two binary trees, write a function to check if they are equal o...
分类:
其他好文 时间:
2014-05-14 01:15:40
阅读次数:
293
二进制相加,本质上就是大整数加法,有关大整数加法我的舍友教过我一个很好的方法,先用一个int数组保存结果,将两个数对应位置相加,全部加完后,再统一处理进位的问题。这个方法同样适用于大整数的乘法。
这个题没什么特别的,注意一下进位别搞错了就行了,还有其实不用像我写的这么麻烦,可以一开始先判断哪个更长一些,交换一下。代码会简洁很多。class Solution {
public:
strin...
分类:
其他好文 时间:
2014-05-13 08:02:00
阅读次数:
239
显示7种Dialog下面是图,然后一次对应的代码实现
实现代码
new AlertDialog.Builder(AlertDialogSamples.this)
.setIcon(R.drawable.alert_dialog_icon)
.setTitle(R.string.alert_dialog_two_button...
分类:
移动开发 时间:
2014-05-13 05:47:34
阅读次数:
446
#!/usr/bin/envpythonimportthreadingimporttimeimportparamikoimportos,sysfromipimportip_list,web_server,ip_msgfromoptparseimportOptionParserfromssh_co.cfg.configimporthost_msgdefopts():parser=OptionParser(usage="usage%progoptions")parser.add_option("-i","--it..
分类:
编程语言 时间:
2014-05-13 03:32:03
阅读次数:
537
数据库脚本(注意测试时先add-->load-->update-->delete-->list)UserMapper版--
---------------------------------------------------------- 主机: ...
分类:
移动开发 时间:
2014-05-12 22:29:59
阅读次数:
463
来源:孙鑫老师c++教程第7集在创建非模态对话框时void
CMyboleView::OnDialog(){// TODO: Add your command handler code here方法一TestDlg
*ptdlg=new TestDlg(this);ptdlg->Create(IDD...
分类:
其他好文 时间:
2014-05-12 21:15:11
阅读次数:
309
先执行:rubyscript/generatemigrationadd_change_flag_to_userschange_flag:Boolean生成时间序列文件:db/migrate/20131016034104_add_changeflag_to_users.rb内容:classAddchangeflagToUsers<ActiveRecord::Migrationdefself.upadd_column:users,:change_flag,:booleanen..
分类:
其他好文 时间:
2014-05-12 03:10:04
阅读次数:
368
.Net里的哈希表和串行化
介绍
本文介绍了,在.net里,使用哈希表和串行化的C#用法。这里使用的示例应用程序是一个电话簿。电话簿应用程序,是一个控制台的程序。它允许你添加,查看,列出和删除它里面的姓名和电话号码。
哈系表是“键-值”对的集合。在.net里,类Hashtable是哈希表的实现。通过调用Add方法,传递你想添加的键值对,可以完成添加。作为键来使用的这些对象,必须实现...
分类:
Web程序 时间:
2014-05-11 21:53:03
阅读次数:
416
1、
??
Surrounded Regions
Given a 2D board containing 'X' and 'O',
capture all regions surrounded by 'X'.
A region is captured by flipping all 'O's into 'X's
in that surrounded region.
For e...
分类:
其他好文 时间:
2014-05-11 18:52:32
阅读次数:
293