-
-
-
-
Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.
Note:
Elements in a triplet (a,b,c) must be in non-descending order. (ie, a ≤ b ≤ c)
The solution set must not contain duplicate triplets.
For example, given array S = {-1 0 1 2 -1 -4},
A solution set is:
(-1, 0, 1)
(-1, -1, 2) ...
阅读题目
面试题
经典指数
-
-
-
-
-
-
下面这段代码的输出结果为:
#include<stdio.h>
void change(int*a, int&b, int c)
{
c=*a;
b=30;
*a=20;
}
int main ( )
{
int a=10, b=20, c=30;
change(&a,b,c);
printf(“%d,%d,%d,”,a,b,c);
return 0;
}
20,30,30
10,20,30
20,30,10
10,30,30 ...
阅读题目
单选题
经典指数
扫描后移动端查看
相关标签
同类标签
|
微信公众号
|
|
欢迎加入,一起群聊
|