Redian新闻
>
实在书荒了,打算看看中原五白的
avatar
实在书荒了,打算看看中原五白的# paladin - 谈古论金,黄梁一梦
H*M
1
given an array of n elements, find if there is a subset of 3 elements sum up
to value T with time complexity O(nlgn).
想不出什么天外飞仙的算法达到O(nlgn)
谁有点idea?
avatar
f*g
2
我吃西红柿
天蚕土豆
唐家三少
辰东
梦入神机
以前看过jj的,感觉it已经入魔了,没兴趣了
其他四位都是起点的小白大神,一直没敢碰,有啥书可以打发书荒的么?
多谢啊
avatar
h*e
3
你听错题了吧

up

【在 H*M 的大作中提到】
: given an array of n elements, find if there is a subset of 3 elements sum up
: to value T with time complexity O(nlgn).
: 想不出什么天外飞仙的算法达到O(nlgn)
: 谁有点idea?

avatar
G*s
4
沦落到五白的书的时候,
还不如整点别的事做
avatar
n*r
5
答案是没有这样的算法

up

【在 H*M 的大作中提到】
: given an array of n elements, find if there is a subset of 3 elements sum up
: to value T with time complexity O(nlgn).
: 想不出什么天外飞仙的算法达到O(nlgn)
: 谁有点idea?

avatar
t*t
6
中原五白,番茄最白?
avatar
H*M
7
是在别地方烤来的.
那最快的算法是多少?

【在 h*******e 的大作中提到】
: 你听错题了吧
:
: up

avatar
R*n
8
唐三的斗罗大陆还可以,虽然胡煽情滥起腻,情节和设定有独到之处。
逆苍天的杀神可看,可以给众多蜂拥而上的小白作者当模板教材。
avatar
c*g
9
easy to get n^2, not sure about nlogn

【在 H*M 的大作中提到】
: 是在别地方烤来的.
: 那最快的算法是多少?

avatar
w*p
10
我也见过这道题。我相信我的算法是nlgn, 但是有些细节不知道怎么写成sudocode

【在 h*******e 的大作中提到】
: 你听错题了吧
:
: up

avatar
H*M
11
你说说吧
据说无解?

【在 w********p 的大作中提到】
: 我也见过这道题。我相信我的算法是nlgn, 但是有些细节不知道怎么写成sudocode
avatar
m*0
12
O(n^2) is trivial .
貌似前段时间Quant版讨论过,有人给出paper link
目前的最好算法就是 O(nlogn)。
记不太清楚了。 找了半天没找到。

up

【在 H*M 的大作中提到】
: given an array of n elements, find if there is a subset of 3 elements sum up
: to value T with time complexity O(nlgn).
: 想不出什么天外飞仙的算法达到O(nlgn)
: 谁有点idea?

avatar
g*y
13
本版就讨论过,我发的帖子问的。
结论是不可能,结论是有paper证明的!!!
avatar
g*y
14
本版就讨论过,我发的帖子问的。
结论是不可能,结论是有paper证明的!!!
avatar
h*e
15
找不到就对了,因为3SUM目前没有人知道o(n^2)的算法,只有在一些特定的model下有
稍微快一点的。

【在 m********0 的大作中提到】
: O(n^2) is trivial .
: 貌似前段时间Quant版讨论过,有人给出paper link
: 目前的最好算法就是 O(nlogn)。
: 记不太清楚了。 找了半天没找到。
:
: up

avatar
H*M
16
ft..我说在哪见过..
那如果是两个,是不是就是hash后,直接过一遍?还是有什么天外飞仙的方法?

【在 g*******y 的大作中提到】
: 本版就讨论过,我发的帖子问的。
: 结论是不可能,结论是有paper证明的!!!

avatar
m*0
17
那就是我记错了。
一个类似的题目在quant版讨论过,
比这个题目复杂。

【在 h*******e 的大作中提到】
: 找不到就对了,因为3SUM目前没有人知道o(n^2)的算法,只有在一些特定的model下有
: 稍微快一点的。

avatar
m*0
18
link to the paper?

【在 g*******y 的大作中提到】
: 本版就讨论过,我发的帖子问的。
: 结论是不可能,结论是有paper证明的!!!

avatar
g*y
19
忘了,记得是篇会议文,还记得貌似是Fairylander给的link

【在 m********0 的大作中提到】
: link to the paper?
avatar
l*i
20
wikipedia search 3SUM problem. There is no better solution than O(n^2)
currently and there are a number of problems that would have a faster
solution if 3SUM has a better than O(n^2) solution, say O(nlogn).
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。