摘要: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : 阅读全文
posted @ 2022-02-15 21:51 fengmao31 阅读(42) 评论(0) 推荐(0) 编辑
摘要: #暴力解法 class Solution { public: vector<int> twoSum(vector<int>& nums, int target) { int n=nums.size(); for(int i=0; i<n;i++) { for(int j=i+1; j<n; j++) 阅读全文
posted @ 2022-02-15 20:35 fengmao31 阅读(23) 评论(0) 推荐(0) 编辑