摘要: 原题地址:https://oj.leetcode.com/problems/add-binary/题意:Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"... 阅读全文
posted @ 2014-06-08 11:45 南郭子綦 阅读(3939) 评论(2) 推荐(0) 编辑
摘要: 原题地址:https://oj.leetcode.com/problems/search-for-a-range/题意:Given a sorted array of integers, find the starting and ending position of a given target ... 阅读全文
posted @ 2014-06-08 10:42 南郭子綦 阅读(3206) 评论(0) 推荐(0) 编辑
摘要: 原题地址:https://oj.leetcode.com/problems/sqrtx/题意:Implementint sqrt(int x).Compute and return the square root ofx.解题思路:实现开平方函数。这里要注意的一点是返回的时一个整数。通过这一点我们可... 阅读全文
posted @ 2014-06-08 10:19 南郭子綦 阅读(4171) 评论(0) 推荐(0) 编辑
摘要: 原题地址:https://oj.leetcode.com/problems/sort-colors/题意:Given an array withnobjects colored red, white or blue, sort them so that objects of the same col... 阅读全文
posted @ 2014-06-08 10:10 南郭子綦 阅读(4437) 评论(0) 推荐(0) 编辑