12 2021 档案

摘要:话不多说,直接上代码。 #include<iostream> #include<string.h> #include<stdlib.h> using namespace std; void test11(int* p) { (*p) = 5; } void test1() { int a = 6; 阅读全文
posted @ 2021-12-26 15:11 念秋 阅读(136) 评论(0) 推荐(0) 编辑
摘要:一个整型数组 nums 里除两个数字之外,其他数字都出现了两次。 请写程序找出这两个只出现一次的数字。要求时间复杂度是O(n),空间复杂度是O(1)。 输入:nums = [4,1,4,6] 输出:[1,6] 或 [6,1] 代码: #include<iostream> #include<vecto 阅读全文
posted @ 2021-12-05 21:52 念秋 阅读(27) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示