08 2023 档案
摘要:``` class Solution { public: int res=0; int lengthOfLongestSubstring(string s) { int n=s.size (); if(!n) return 0; bool st[128]={false}; for(int j=0,i
阅读全文
摘要:``` class Solution { public: vector dailyTemperatures(vector& t) { stack st; int n=t.size(); vector res(n); for(int i=n-1;i>=0;i--) { while(st.size()&
阅读全文
摘要:# 暴力 ``` class Solution { public: int res=0; int countSubstrings(string s) { int n=s.size(); for(int i=0;i=0&&r=0&&r> f(n+1,vector(n+1,false)); for(in
阅读全文
摘要:``` class Solution { public: int findUnsortedSubarray(vector& nums) { int n=nums.size(); int l=0,r=n-1; while(l0&&nums[r]>=nums[r-1]) r--; int min_num
阅读全文
摘要:``` /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr),
阅读全文