摘要: 每日温度 题目链接:739. 每日温度 - 力扣(LeetCode) 思路:很容易想到暴力解法。但超时也是很轻松的。 class Solution { public: vector<int> dailyTemperatures(vector<int>& temperatures) { // stac 阅读全文
posted @ 2024-03-26 23:26 SandaiYoung 阅读(15) 评论(0) 推荐(0)
摘要: 回文子串 题目链接:647. 回文子串 - 力扣(LeetCode)思路:投降 class Solution { public: int countSubstrings(string s) { vector<vector<bool>> dp(s.size(), vector<bool>(s.size 阅读全文
posted @ 2024-03-26 20:42 SandaiYoung 阅读(9) 评论(0) 推荐(0)