摘要: 题目: Write a function that takes a string as input and returns the string reversed. Example: Given s = "hello", return "olleh". 思路:首尾字符交换 c++代码: 阅读全文
posted @ 2016-06-04 14:52 学渣进了奥赛班 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 最近在做一些算法题目,就在这里做个记录。 题目: Given two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "100". 思路: 1. 按位累加 2. 考虑进 阅读全文
posted @ 2016-06-04 14:04 学渣进了奥赛班 阅读(295) 评论(0) 推荐(0) 编辑