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