简历:The Google Resume: How to Prepare for a Career and Land a Job at Apple, Microsoft, Google, or any Top Tech Company
算法学习书籍:Introduction to Algorithms
编程珠玑:Programming Pearls (2nd Edition)
C++ 学习:The C++ Programming Language, 4th Edition
经典操作系统书籍,龙书:Operating System Concepts
创业:The Start-up of You: Adapt to the Future, Invest in Yourself, and Transform Your Career
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:
"((()))", "(()())", "(())()", "()(())", "()()()"
一个小破题,dp还有recursion,关键是思路要清楚还有recursion要很熟练。
先排左边括号,再看中间所有的可能,就是top down,再botton up。先编织最外面一层,再进入到最里面,从每个基本情况排列起来。可以和permutation, subsets对比,都是recursion和dp的题目。
先排左边括号,再看中间所有的可能,就是top down,再botton up。先编织最外面一层,再进入到最里面,从每个基本情况排列起来。可以和permutation, subsets对比,都是recursion和dp的题目。
No comments:
Post a Comment