Given two binary strings, return their sum
(also a binary string).For example,a ="11"b
="1"Return"100".思路:一个二进制字符串相加;首先从字符串的末尾开始,先二进制字符转化为数字,然后再相加;然后将...
分类:
其他好文 时间:
2014-05-05 23:10:15
阅读次数:
319
1、One To One 单相背景: 古代一个老婆
只能关联一个老公husband.javapackage com.rhythmk.model;public class husband { public
Integer getHusbandId() { return husbandId; }...
分类:
系统相关 时间:
2014-05-05 23:06:28
阅读次数:
516
遇到的问题:input{1,1,1}, output{1,1}, expected{1},
原因在于若temp.val==temp.next.val, 则需要temp.next=temp.next.next,
这时候就不要temp=temp.next了注意停止条件不光是temp!=null,还应该有...
分类:
其他好文 时间:
2014-05-05 22:47:08
阅读次数:
454
Link:http://oj.leetcode.com/problems/reverse-nodes-in-k-group/Given a linked
list, reverse the nodes of a linked listkat a time and return its modifie...
分类:
其他好文 时间:
2014-05-05 22:46:42
阅读次数:
456
Link:http://oj.leetcode.com/problems/swap-nodes-in-pairs/Given a linked list,
swap every two adjacent nodes and return its head.For example,Given1->2-...
分类:
其他好文 时间:
2014-05-05 22:45:37
阅读次数:
331
#include #include #include using namespace std;int
n,leap;int vis[12];void dfs(int index,int num){ if(leap) return ; if(index>n)
{ ...
分类:
其他好文 时间:
2014-05-05 22:01:05
阅读次数:
593
题目
Reverse digits of an integer.
Example1: x = 123, return 321
Example2: x = -123, return -321
Have you thought about this?
Here are some good questions to ask before coding. Bonus points...
分类:
其他好文 时间:
2014-05-03 17:35:30
阅读次数:
345
1、具体错误如下
2014-5-2 21:38:29 com.opensymphony.xwork2.util.logging.jdk.JdkLogger error
严重: Exception occurred during processing request: null
java.lang.NullPointerException
at com.you.file.upload.actio...
分类:
其他好文 时间:
2014-05-03 16:08:37
阅读次数:
353
模块“市”的设计与加入
现在重复加入“省”模块的过程,来加入市的模块。
1、建立数据表CityCREATE TABLE [dbo].[City](
[tf_cityId] [nvarchar](4) COLLATE Chinese_PRC_CI_AS NOT NULL,
[tf_provinceId] [nvarchar](2) COLLATE Chinese_PRC_...
分类:
其他好文 时间:
2014-05-03 16:02:29
阅读次数:
293
Given a set of distinct integers, S, return all possible subsets.
Note:
Elements in a subset must be in non-descending order.The solution set must not contain duplicate subsets.
For exa...
分类:
其他好文 时间:
2014-05-03 15:47:53
阅读次数:
289