What are the eight life cycle hook functions of Vue>>>
This error occurred when doing the topic on leetcode
The original code is as follows:
1 class Solution {
2 public:
3 vector<int> twoSum(vector<int>& nums, int target) {
4 vector<int> v;
5 unordered_map<int, int> m;
6 for(int i=0;i<nums.size();++i)
7 {
8 int tt=target-nums[i];
9 if(m.find(tt)!=m.end())
10 {
11 v.push_back(m[tt]);
12 v.push_back(i);
13 return v;
14 }
15 else
16 m[nums[i]]=i;
17 }
18 //return v;
19 }
20 };
You can see that 18 lines have been commented out by me. It is the missing line that causes the program to not return the value
Similar Posts:
- [leetcode] 280. Wiggle sort
- 324. Wiggle Sort II
- [leetcode] 140. Word break II word split II
- [LeetCode] 291. Word Pattern II
- Solve the problem of style in cannot read property ‘style’ of null
- [Solved] Java Call Error: java.lang.IllegalArgumentException: wrong number of arguments
- Solve the problem of style in cannot read property ‘style’ of null
- [Solved] C++ Error: error: call-to-implicitly-deleted-default-constructor
- Request failed with status code 500 & Self referencing loop detected for property ‘xx‘ with type
- missing required architecture x86_64 in file