当前位置:网站首页>Leetcode exercise 2 - sum of two numbers
Leetcode exercise 2 - sum of two numbers
2022-07-27 20:08:00 【But the sky is cold_ Good autumn】
vector<int> twoSum(vector<int>& nums, int target) {
vector<int> vec;
int size = nums.size();
for(int i = 0; i < size; i++)
{
for(int j = i + 1; j < size; j++)
{
if(nums[i] + nums[j] == target)
{
vec.push_back(i);
vec.push_back(j);
break;
}
}
}
return vec;
}边栏推荐
- Global function
- [pytorch series] detailed explanation of the torchvision image processing library of pytorch
- Chemical giant BASF & Pasqual: using quantum neural network to optimize weather forecast
- In a real case, college students were cheated when taking orders. I hope you won't be cheated [painful lesson]
- Datepicker and TimePicker
- 黑客入门教程(非常详细)从零基础入门到精通,看完这一篇就够了。
- 成年人只有一份主业是要付出代价的,被人事劝退后,我哭了一整晚
- Overview of deep active learning 2020
- ‘vite‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件
- 1.2 pedestrian recognition based on incremental generation of occlusion and confrontation suppression (code understanding and experimental progress + Report)
猜你喜欢

1.2、基于增量式生成遮挡与对抗抑制的行人再识别(代码理解与实验进度+报告)
![22 year PMP test [Quanzhen agile test]](/img/72/d3e46a820796a48b458cd2d0a18f8f.png)
22 year PMP test [Quanzhen agile test]
![[论文阅读] Rich Feature Hierarchies for Accurate Object Detection and Semantic Segmentation](/img/a9/690f52b5c4afba684f0add2434888c.png)
[论文阅读] Rich Feature Hierarchies for Accurate Object Detection and Semantic Segmentation

GridView (implement table display icon)

由单片机XTALIN引脚和XTALOUT引脚导出的对晶体震荡电路的深入理解

Explore a new generation of activities to win customers, virtualization activities win a trick | manufacturer solicitation

Ms721 load test

TS2532: Object is possibly ‘undefined‘

成年人只有一份主业是要付出代价的,被人事劝退后,我哭了一整晚

Chapter 3 basic operation
随机推荐
C170:复试筛选
22年PMP考试【全真敏捷试题】
In a real case, college students were cheated when taking orders. I hope you won't be cheated [painful lesson]
Function priority
如何运行 kevinchappell / formBuilder
如何快速提升抖音小店三分钟回复率?哪些情况会影响抖音小店回复率呢?
Detailed introduction to common coordinate system of cesium
11.2DHCP
[redis] several deployment methods of redis
C#网络应用编程,实验2:IP地址转换和域名解析练习
pytorch lstm+attention
剑指 Offer 25. 合并两个排序的链表
Introduction to basic cesium controls
化工巨头巴斯夫&Pasqal:利用量子神经网络优化天气预报
‘vite‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件
ACL11.12
Rodin installs the SMT solvers plug-in
TS2532: Object is possibly ‘undefined‘
黑客入门教程(非常详细)从零基础入门到精通,看完这一篇就够了。
libpcap库和pcap_sendpacket接口函数了解