摘要: 1 //跟264题差不多 2 class Solution 3 { 4 public: 5 int nthSuperUglyNumber(int n, vector<int>& primes) 6 { 7 vector<int> dp(n); 8 dp[0] = 1; 9 vector<int> p 阅读全文
posted @ 2020-04-20 23:32 Jinxiaobo0509 阅读(160) 评论(0) 推荐(0)
摘要: 1 class Solution 2 { 3 public: 4 vector<int> findMinHeightTrees(int n, vector<vector<int>>& edges) 5 { 6 vector<int> ans; 7 if(n == 1) return {0}; 8 v 阅读全文
posted @ 2020-04-20 22:34 Jinxiaobo0509 阅读(144) 评论(0) 推荐(0)
摘要: 1 class Solution 2 { 3 unordered_map<string,vector<char>> hash; 4 public: 5 bool pyramidTransition(string bottom, vector<string>& allowed) 6 { 7 for(a 阅读全文
posted @ 2020-04-20 14:39 Jinxiaobo0509 阅读(208) 评论(0) 推荐(0)
摘要: 1 /** 2 * // This is the interface that allows for creating nested lists. 3 * // You should not implement it, or speculate about its implementation 4 阅读全文
posted @ 2020-04-20 10:27 Jinxiaobo0509 阅读(120) 评论(0) 推荐(0)
摘要: 1 class Solution 2 { 3 public: 4 string decodeString(string s) 5 { 6 int len = s.size(); 7 int num = 0; 8 stack<int> numstack; 9 stack<string> strstac 阅读全文
posted @ 2020-04-20 10:18 Jinxiaobo0509 阅读(118) 评论(0) 推荐(0)