翻译给定两个二进制字符串,返回它们的和(也是二进制字符串)。例如,
a = "11"
b = "1"
返回 "100".原文Given two binary strings, return their sum (also a binary string).For example,
a = "11"
b = "1"
Return "100".分析我一开始写了这个算法,虽然实现了功能,不过不符合题目的用...
分类:
其他好文 时间:
2016-02-02 15:14:11
阅读次数:
115
WC结束了,来补一下这题的题解 首先感谢SC神犇YYY(第一个AC此题的神犇)教我做法 再感谢教YYY做法的Claris大爷 首先,我们发现一个性质,一个合法的数的后缀必定是合法的,所以我们就可以bfs了,往合法的数的最高位加0或1 只有最高位是1的数才有可能是答案 YYY大爷告诉我们,并且不难证明
分类:
其他好文 时间:
2016-02-02 14:58:38
阅读次数:
191
MongoDB 插入文档 本章节中我们将向大家介绍如何将数据插入到MongoDB的集合中。 文档的数据结构和JSON基本一样。 所有存储在集合中的数据都是BSON格式。 BSON是一种类json的一种二进制形式的存储格式,简称Binary JSON。 插入文档 MongoDB 使用 insert()
分类:
数据库 时间:
2016-02-02 14:29:52
阅读次数:
193
用Xcode7向App Store提交二进制文件是,提示ERROR ITMS-90096:"You binary is not optimized for iPhone 5....". 在工程里的Images.xcassets添加并设置LaunchImage对解决ERROR ITMS-90096根本
分类:
其他好文 时间:
2016-02-01 18:59:36
阅读次数:
163
diudiugirl@DIUs:/var/www/ashelf$ RAILS_ENV=production rails s Usage: rails new APP_PATH [options] Options: -r, [--ruby=PATH] # Path to the Ruby binary
分类:
其他好文 时间:
2016-02-01 15:15:35
阅读次数:
409
package util; import java.util.Arrays; import java.util.zip.Deflater; import java.util.zip.Inflater; import org.apache.commons.codec.binary.Base64; pu
分类:
其他好文 时间:
2016-02-01 15:11:34
阅读次数:
123
One way to serialize a binary tree is to use pre-oder traversal. When we encounter a non-null node, we record the node's value. If it is a null node,
分类:
其他好文 时间:
2016-02-01 13:59:13
阅读次数:
115
判断一棵二叉搜索树是否有效。有效是指每个节点的值大于左节点,小于右节点(如果有对应节点的话),且它的左节点和右节点也满足这种条件。...
分类:
其他好文 时间:
2016-02-01 09:54:17
阅读次数:
167
The structure of Segment Tree is a binary tree which each node has two attributes start and end denote an segment / interval. start and end are both i
分类:
其他好文 时间:
2016-02-01 09:39:40
阅读次数:
172
One way to serialize a binary tree is to use pre-oder traversal. When we encounter a non-null node, we record the node's value. If it is a null node,
分类:
其他好文 时间:
2016-02-01 09:39:10
阅读次数:
174