摘要:
回文子串数 问题理解 找出给定字符串的回文子串数。 class Solution { public: int countSubstrings(string s) { vector<vector<bool>> dp(s.size(), vector<bool>(s.size(), false)); i 阅读全文
posted @ 2025-12-23 12:42
FAfa_C++
阅读(3)
评论(0)
推荐(0)
摘要:
每日温度 问题理解 给定包含一个时间序列每日温度的整数数组,返回一个数组,数组第i位代表之后会有几天的温度高于当前。 思路: 暴力解法时间复杂度:m*2; 单调栈思路实现: class Solution { public: vector<int> dailyTemperatures(vector<i 阅读全文
posted @ 2025-12-23 12:42
FAfa_C++
阅读(4)
评论(0)
推荐(0)
浙公网安备 33010602011771号