当前位置:网站首页>C language implementation of sum of two numbers [easy to understand]
C language implementation of sum of two numbers [easy to understand]
2022-07-01 17:12:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
int *twoSum(int *nums , int numsSize , int target , int *returnSize)
{
int i = 0 , j = 0;
*returnSize = 2;
int *a = (int *)malloc(sizeof(int) * 2);
for(i = 0;i<numsSize;i++)
{
for(j=i+1;j<numsSize;j++)
{
if(nums[i] + nums[j] == 0)
{
a[0] = i;
a[1] = j;
return a;
}
}
}
return a;
}Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/130942.html Link to the original text :https://javaforall.cn
边栏推荐
- Jojogan practice
- LeetCode中等题之TinyURL 的加密与解密
- Vulnhub range hacker_ Kid-v1.0.1
- Flux d'entrées / sorties et opérations de fichiers en langage C
- Machine learning 11 clustering, outlier discrimination
- String类
- Research and investment strategy report of China's sodium sulfate industry (2022 Edition)
- Gold, silver and four want to change jobs, so we should seize the time to make up
- 美国国家安全局(NSA)“酸狐狸”漏洞攻击武器平台技术分析报告
- 中国冰淇淋市场深度评估及发展趋势预测报告(2022版)
猜你喜欢

多线程使用不当导致的 OOM

SQL question brushing 1050 Actors and directors who have worked together at least three times

Encryption and decryption of tinyurl in leetcode

剑指 Offer 20. 表示数值的字符串

智能运维实战:银行业务流程及单笔交易追踪

ShenYu 网关开发:在本地启用运行

字节跳动数据平台技术揭秘:基于 ClickHouse 的复杂查询实现与优化

Iommu/smmuv3 code analysis (10) page table operation

Alibaba cloud, Zhuoyi technology beach grabbing dialogue AI

SystemVerilog-结构体(二)
随机推荐
Yyds dry inventory MySQL RC transaction isolation level implementation
Transition technology from IPv4 to IPv6
Openlayers 自定义气泡框以及定位到气泡框
Research Report on development prediction and investment direction of nylon filament sewing thread in China (2022 Edition)
Mysql database - Advanced SQL statement (2)
How to use etcd to realize distributed /etc directory
Cookies and session keeping technology
ACL 2022 | 分解的元学习小样本命名实体识别
SQL question brushing 627 Change gender
判断链表是否是回文链表
整形数组合并【JS】
中国酶制剂市场预测与投资战略研究报告(2022版)
Integer array merge [JS]
mysql -- explain性能优化
Gaussdb (for MySQL):partial result cache, which accelerates the operator by caching intermediate results
Research and investment strategy report of neutral protease industry in China (2022 Edition)
RadHat搭建内网YUM源服务器
美国国家安全局(NSA)“酸狐狸”漏洞攻击武器平台技术分析报告
Hi Fun Summer, play SQL planner with starrocks!
String类