码迷,mamicode.com
首页 >  
搜索关键字:add two numbers    ( 52886个结果
【LeetCode】Combinations
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
Leetcode 树 Same Tree
本文为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
leetcode第一刷_Add Binary
二进制相加,本质上就是大整数加法,有关大整数加法我的舍友教过我一个很好的方法,先用一个int数组保存结果,将两个数对应位置相加,全部加完后,再统一处理进位的问题。这个方法同样适用于大整数的乘法。 这个题没什么特别的,注意一下进位别搞错了就行了,还有其实不用像我写的这么麻烦,可以一开始先判断哪个更长一些,交换一下。代码会简洁很多。class Solution { public: strin...
分类:其他好文   时间:2014-05-13 08:02:00    阅读次数:239
0301-APP-Dialog
显示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
原创python多线程批量管理工具batch(不断完善)
#!/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
mybatis(单表增删改查useMapper版)
数据库脚本(注意测试时先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
ruby向表里加入字段
先执行: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里的哈希表和串行化   介绍 本文介绍了,在.net里,使用哈希表和串行化的C#用法。这里使用的示例应用程序是一个电话簿。电话簿应用程序,是一个控制台的程序。它允许你添加,查看,列出和删除它里面的姓名和电话号码。 哈系表是“键-值”对的集合。在.net里,类Hashtable是哈希表的实现。通过调用Add方法,传递你想添加的键值对,可以完成添加。作为键来使用的这些对象,必须实现...
分类:Web程序   时间:2014-05-11 21:53:03    阅读次数:416
leetcode --day12 Surrounded Regions & Sum Root to Leaf Numbers & Longest Consecutive Sequence
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!