LeetCode Stack

LeetCode + 《剑指Offer II》刷题笔记。 栈 剑指 Offer II 036. 后缀表达式 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 class Solution { public: int evalRPN(vector<string>& tokens) { stack<int> s; int a,b,res; for(string&

LeetCode Dynamic Programming

LeetCode + 《剑指Offer II》刷题笔记。 动态规划 1D DP 70 Climbing Stairs 1 2 3 4 5 6 7 8 9 10 11 12 class Solution { public: int climbStairs(int n) { vector<int> dp(n+1); dp[0]=1; dp[1]=1; for(int i=2;i<=n;i++){ dp[i]=dp[i-1]+dp[i-2]; } return dp[n]; } }; 时间复杂度:O(n) 空

精彩video

网络上看过的精彩讲座/课程/录像/视频等: A Philosophy of Software Design | John Ousterhout | Talks at Google Jul 15 A Philosophy of Software Design | John Ousterhout | Talks at Google John Ousterhout, Professor of Computer Science at Stanford University, discusses complex techniques on how to become a more confident coder. John is excited