
backtracking
文章平均质量分 66
yanrui92
这个作者很懒,什么都没留下…
展开
-
leetcode-Permutations
Given a collection of numbers, return all possible permutations. For example, [1,2,3] have the following permutations: [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], and [3,2,1]. public class原创 2015-01-09 10:05:48 · 361 阅读 · 0 评论 -
leetcode-letter combination of a phone number
Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telephone buttons) is given below. Input:Digit st原创 2015-01-08 06:04:27 · 317 阅读 · 0 评论 -
leetcode-generate parentheses
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: "((()))", "(()())", "(())()", "()(())", "()()原创 2015-01-08 05:13:09 · 297 阅读 · 0 评论