成吉思(刷)

Friday, January 29, 2016

LeetCode Q22: Generate Parenthesis

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:
"((()))", "(()())", "(())()", "()(())", "()()()"


Posted by Brian Zhang at 8:41 AM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: LeetCode

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

About Me

Brian Zhang
View my complete profile

Blog Archive

  • ▼  2016 (306)
    • ►  May (33)
    • ►  April (99)
    • ►  March (105)
    • ►  February (55)
    • ▼  January (14)
      • LeetCode Q25: Reverse Nodes in k-Group (Hard)
      • LeetCode Q24: Swap Nodes in Pairs
      • LeetCode Q23: Merge k Sorted Lists (Hard)
      • LeetCode Q22: Generate Parenthesis
      • LeetCode Q21: Merge two sorted lists
      • LeetCode Q18: 4Sum
      • LeetCode Q16: 3Sum Cloest
      • How to create virtual environment for Python
      • LeetCode Q15: 3 Sum
      • LeetCode Q11: Container With Most Water
      • LeetCode Q4: Median of Two Sorted Arrays (Hard)
      • LeetCode Q10: Regular Expression Matching
      • How to insert code to Blogger
      • Hello Blogger!
Picture Window theme. Theme images by TommyIX. Powered by Blogger.