Redian新闻
>
西红柿是可以这样缝的
avatar
西红柿是可以这样缝的# gardening - 拈花惹草
j*y
1
Find a pair of numbers that sums up to zero (or any other number), then
find three (and then four) numbers that sum up to zero
有什么好的方法? 多谢
avatar
i*c
2
问个问题,是不是小公司,引用少,eb1b就没戏了?
公司不大,但是在本行业里面很有名气。
引用是因为专业太窄了。
如果加急file到tx会有多大的机会被批啊?
phd,文章10篇,review7,8篇。
avatar
R*C
3
树上看是两个吧
★ 发自iPhone App: ChineseWeb 7.8
avatar
j*y
4
俺只会把所有3个数或4个数组合列出来
有啥好办法?
avatar
h*r
5
just do it even you have only 50% chance.

【在 i**c 的大作中提到】
: 问个问题,是不是小公司,引用少,eb1b就没戏了?
: 公司不大,但是在本行业里面很有名气。
: 引用是因为专业太窄了。
: 如果加急file到tx会有多大的机会被批啊?
: phd,文章10篇,review7,8篇。

avatar
R*C
6
摘下来看看

★ 发自iPhone App: ChineseWeb 7.8

【在 R*C 的大作中提到】
: 树上看是两个吧
: ★ 发自iPhone App: ChineseWeb 7.8

avatar
j*8
8
no such thing
avatar
h*e
9
比版大的手艺高多了

【在 R*C 的大作中提到】
: 树上看是两个吧
: ★ 发自iPhone App: ChineseWeb 7.8

avatar
j*y
10
找了半天也没找到下面算法
There is a simple algorithm to solve 3SUM in O(n2) time.
有code吗 多谢

【在 g***s 的大作中提到】
: http://en.wikipedia.org/wiki/3SUM
avatar
c*a
11
小公司不是问题。
avatar
f*c
12
赞技术
avatar
j*y
13

public static int count(int[] a) {
int N = a.length;
Arrays.sort(a);
int cnt = 0;
for (int i = 0; i < N; i++) {
for (int j = i+1; j < N; j++) {
int k = Arrays.binarySearch(a, -(a[i] + a[j]));
if (k > j) cnt++;
}
}
return cnt;
}

【在 j**y 的大作中提到】
: 找了半天也没找到下面算法
: There is a simple algorithm to solve 3SUM in O(n2) time.
: 有code吗 多谢

avatar
G*0
14
再多弄点review
avatar
L*a
15
可怜,长的时候卡住了吧。。。
avatar
g*e
16
this is O(n^2*lgn). there is o(n^2) algorithm.
use head and tail pointers in your second loop to do the search.

【在 j**y 的大作中提到】
:
: public static int count(int[] a) {
: int N = a.length;
: Arrays.sort(a);
: int cnt = 0;
: for (int i = 0; i < N; i++) {
: for (int j = i+1; j < N; j++) {
: int k = Arrays.binarySearch(a, -(a[i] + a[j]));
: if (k > j) cnt++;
: }

avatar
l*g
17
一般大概要多少个?大家都是从哪里找呢?

【在 G********0 的大作中提到】
: 再多弄点review
avatar
y*8
18
哈,有不对称之美!
看不清多重?有参赛实力吗?
avatar
i*c
20
要多少review?more than 10?
avatar
R*C
21
554g,比我之前参赛的重些,不过貌似排名目前不变

【在 y*****8 的大作中提到】
: 哈,有不对称之美!
: 看不清多重?有参赛实力吗?

avatar
T*m
22
哈哈,名次不变就不更新了。比上次的大,总算是个进步。

【在 R*C 的大作中提到】
: 554g,比我之前参赛的重些,不过貌似排名目前不变
avatar
z*e
23
我也是这么想的~

【在 L******a 的大作中提到】
: 可怜,长的时候卡住了吧。。。
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。