[LeetCode] Subsets II 解题报告

摘要: Given a collection of integers that might contain duplicates, S, return all possible subsets.Note:Elements in a subset must be in non-descending order... 阅读全文
posted @ 2013-01-07 08:14 小刀初试 阅读(164) 评论(0) 推荐(0) 编辑

[LeetCode] Subsets 解题报告

摘要: 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 c... 阅读全文
posted @ 2013-01-07 08:03 小刀初试 阅读(192) 评论(0) 推荐(0) 编辑

[LeetCode] String to Integer (atoi) 解题报告

摘要: Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below a... 阅读全文
posted @ 2013-01-07 06:39 小刀初试 阅读(125) 评论(0) 推荐(0) 编辑

[LeetCode] Sqrt(x) 解题报告

摘要: Implement int sqrt(int x).Compute and return the square root of x.» Solve this problem[解题思路]二分法。但是这题有意思的是,二分过程中终止条件的确认。因为整数的乘法有可能导致溢出,而这种溢出的检测跟整数加法直接判... 阅读全文
posted @ 2013-01-07 05:29 小刀初试 阅读(444) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示