2014年6月18日

Leetcode:Letter Combinations of a Phone Number

摘要: Description:Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on ... 阅读全文

posted @ 2014-06-18 21:49 soyscut 阅读(197) 评论(0) 推荐(0) 编辑

Leetcode:Pow(x,n)

摘要: Description: Implement pow(x,n).分析: 求幂次运算,典型的分治算法来解。 因为pow(x,n/2)*pow(x,n/2) 有着重复运算,分治法就会非常快O(log n) 1 class Solution { 2 public: 3 double findval... 阅读全文

posted @ 2014-06-18 21:41 soyscut 阅读(183) 评论(0) 推荐(0) 编辑

Leetcode:Combination Sum

摘要: Description:Given a set of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Thesame... 阅读全文

posted @ 2014-06-18 21:36 soyscut 阅读(337) 评论(0) 推荐(0) 编辑

导航