2014年3月8日

Generate Parentheses

摘要: Givennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, a solution set is:"((()))", "(()())", "(())()", "()(())", "()()()"class Solution {public: vector generateParenthesis(int n) { 阅读全文

posted @ 2014-03-08 11:26 pengyu2003 阅读(100) 评论(0) 推荐(0) 编辑

导航