摘要: Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given"25525511135",return["255.255.11.135", "255.255.111.35"]. (Order does not matter)class Solution {public: vector ans; vector restoreIpAddresses(stri 阅读全文
posted @ 2013-06-29 11:33 一只会思考的猪 阅读(223) 评论(0) 推荐(0) 编辑
摘要: Given a collection of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Each number inCmay only be usedoncein the combination.Note:All numbers (including target) will be positive integers.Elements in a combination (a1,a2, � ,ak) must 阅读全文
posted @ 2013-06-29 10:20 一只会思考的猪 阅读(234) 评论(0) 推荐(0) 编辑
摘要: Given a set of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Thesamerepeated number may be chosen fromCunlimited number of times.Note:All numbers (including target) will be positive integers.Elements in a combination (a1,a2, � ,ak 阅读全文
posted @ 2013-06-29 09:48 一只会思考的猪 阅读(195) 评论(0) 推荐(0) 编辑