摘要: !!!题目链接!!! 解决方案 /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * Li 阅读全文
posted @ 2022-01-07 07:12 ReaIms 阅读(28) 评论(0) 推荐(0)
摘要: !!!题目链接!!! Solution: class Solution { public: string reverseWords(string s) { int le = s.size()-1; int ri = s.size()-1; reverse(s.begin(), s.end()); s 阅读全文
posted @ 2022-01-07 06:05 ReaIms 阅读(36) 评论(0) 推荐(0)
摘要: !!!题目链接!!! Solution: class Solution { public: void moveZeroes(vector<int>& nums) { int le = 0; int ri = 0; while(ri != nums.size()) { if(nums[ri] != 0 阅读全文
posted @ 2022-01-07 03:55 ReaIms 阅读(27) 评论(0) 推荐(0)
摘要: !!!题目链接!!! Solution: class Solution { public: vector<int> twoSum(vector<int>& numbers, int target) { int le = 0; int ri = numbers.size()-1; vector<int 阅读全文
posted @ 2022-01-07 03:45 ReaIms 阅读(31) 评论(0) 推荐(0)
摘要: !!!题目链接!!! Solution: class Solution { public: void moveZeroes(vector<int>& nums) { int le = 0; int ri = 0; while(ri != nums.size()) { if(nums[ri] != 0 阅读全文
posted @ 2022-01-07 03:20 ReaIms 阅读(35) 评论(0) 推荐(0)