摘要:
class Solution { public: ListNode* mergeTwoLists(ListNode* list1, ListNode* list2) { ListNode* dummynode=new ListNode(0); ListNode* cur=dummynode; whi 阅读全文
posted @ 2023-08-05 17:35
Ojalá
阅读(12)
评论(0)
推荐(0)
摘要:
双指针,头尾指针每次移动较小的那个,保证有取到更大值的可能性 class Solution { public: int maxArea(vector<int>& height) { int size=height.size(); int i=0,j=size-1; int maxval=0; whi 阅读全文
posted @ 2023-08-05 10:31
Ojalá
阅读(10)
评论(0)
推荐(0)
摘要:
class Solution { public: bool isMatch(string s, string p) { int m=s.size()+1;int n=p.size()+1; vector<vector<bool>> dp(m,vector<bool>(n,false)); dp[0] 阅读全文
posted @ 2023-08-05 01:37
Ojalá
阅读(17)
评论(0)
推荐(0)

浙公网安备 33010602011771号