2025年2月17日
摘要: 1.动态规划,时间复杂度O(n^2) 1 class Solution { 2 public: 3 vector<int> dp; //表示以dp[i]表示以i结尾的最长子序列长度 4 int lengthOfLIS(vector<int>& nums) { 5 dp.resize(nums.siz 阅读全文
posted @ 2025-02-17 21:46 Coder何 阅读(10) 评论(0) 推荐(0)