摘要: https://www.nowcoder.com/practice/253d2c59ec3e4bc68da16833f79a38e4?tpId=13&tqId=11208&tPage=1&rp=1&ru=%2Fta%2Fcoding-interviews&qru=%2Fta%2Fcoding-int 阅读全文
posted @ 2021-03-27 21:46 rxh1999 阅读(42) 评论(0) 推荐(0)
摘要: /* struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) { } }; */ class Solution { public: ListNode* deleteDuplicati 阅读全文
posted @ 2021-03-27 20:35 rxh1999 阅读(38) 评论(0) 推荐(0)
摘要: https://www.nowcoder.com/practice/94a4d381a68b47b7a8bed86f2975db46?tpId=13&tqId=11204&tPage=1&rp=1&ru=%2Fta%2Fcoding-interviews&qru=%2Fta%2Fcoding-int 阅读全文
posted @ 2021-03-27 19:37 rxh1999 阅读(45) 评论(0) 推荐(0)
摘要: vector<pair<int, double>> dicesSum(int n) { // Write your code here vector<vector<double>> dp; dp.resize(n+1); int cnt = 1; for(auto& r: dp){ r.resize 阅读全文
posted @ 2021-03-27 19:11 rxh1999 阅读(39) 评论(0) 推荐(0)
摘要: class Solution { public: int lengthOfLongestSubstring(string s) { unordered_map<char, int> pre; int left, right; left = right = 0; int maxlen = 0; for 阅读全文
posted @ 2021-03-27 15:47 rxh1999 阅读(21) 评论(0) 推荐(0)