Given two binary strings, return their sum (also a binary string).
For example,
a = "11"
b = "1"
Return "100".
具体一位一位地加就行了,考虑进位的问题。还有最后记得把生成的string反过来再返回,因为我们是从最低位开始加的。
public class Solu...
分类:
其他好文 时间:
2014-08-30 01:16:58
阅读次数:
286
Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2->1->4->3.Your algor...
分类:
其他好文 时间:
2014-08-30 01:11:08
阅读次数:
286
转自:http://www.wiseowl.co.uk/blog/s148/group-pane-advanced-mode.htmRepeating Page Headers in Reporting Services 2008 R2Part two of a two-part series of...
分类:
其他好文 时间:
2014-08-29 19:52:08
阅读次数:
282
问题描述: ????????在一个页面中定义了两个path值相同的<form:input>,但是在添加了Spring MVC数据验证的时候出现了会将这两个值设置为"‘",不知道是什么情况?? ????????主要代码如下: <form:...
分类:
其他好文 时间:
2014-08-29 18:36:08
阅读次数:
223
题目:
Given a linked list, swap every two adjacent nodes and return its head.
For example,
Given 1->2->3->4, you should return the list as 2->1->4->3.
Your algorithm should use only cons...
分类:
其他好文 时间:
2014-08-29 13:13:37
阅读次数:
169
The Java platform has two components: The Java Virtual Machine The Java Application Programming Interface(API)The API are known as packages.
分类:
编程语言 时间:
2014-08-29 12:57:47
阅读次数:
201
Given two wordsword1andword2, find the minimum number of steps required to convertword1toword2. (each operation is counted as 1 step.)You have the fol...
分类:
其他好文 时间:
2014-08-29 10:45:37
阅读次数:
199
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.public cl...
分类:
其他好文 时间:
2014-08-29 01:16:36
阅读次数:
267
LeetCode: Same TreeGiven two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are struct...
分类:
其他好文 时间:
2014-08-28 22:40:46
阅读次数:
266
Description
The funny stone game is coming. There are n piles of stones, numbered with
0, 1, 2,..., n - 1. Two persons pick stones in turn. In every turn, each person selects three piles of stones...
分类:
其他好文 时间:
2014-08-28 16:15:29
阅读次数:
523