摘要: 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,... 阅读全文
posted @ 2015-10-30 12:12 fenshen371 阅读(132) 评论(0) 推荐(0) 编辑
摘要: The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting the total number... 阅读全文
posted @ 2015-10-30 12:00 fenshen371 阅读(133) 评论(0) 推荐(0) 编辑
摘要: Givennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, a solution set is:"((()))... 阅读全文
posted @ 2015-10-30 06:36 fenshen371 阅读(135) 评论(0) 推荐(0) 编辑