Redian新闻
>
Citi offer: 0% APR on transfer and new purchase for existing card for one year
avatar
Citi offer: 0% APR on transfer and new purchase for existing card for one year# Money - 海外理财
j*n
1
最少需要比较n+ceiling(lgn)-2次,这个时候有常数空间复杂度的实现么?
avatar
w*j
2
Need make BT first, then purchases after the BT transaction will also be 0%
APR.
BT minimum fee is $5.
When you need pay tuition or new car, it can be useful.
avatar
I*s
3
I think so. For each comparison, swap the bigger one to right. This way you
keep track of previous information, which is helpful when do second round of
comparison. The cons is you changed the structure of the original list.
avatar
m*r
4
the offer for my AA card is 0% APR BT new purchase for 18 months

%

【在 w***j 的大作中提到】
: Need make BT first, then purchases after the BT transaction will also be 0%
: APR.
: BT minimum fee is $5.
: When you need pay tuition or new car, it can be useful.

avatar
m*g
5
没有吧
如果用那种tournament的方法,每一轮都要保存胜利者的信息。
即使每次把失败者的信息丢弃,从最底层到最顶层,需要的空间至少
O(n) ---> O(lgn)

【在 j***n 的大作中提到】
: 最少需要比较n+ceiling(lgn)-2次,这个时候有常数空间复杂度的实现么?
avatar
j*n
6
能举个例子么?
比如:
63 24 78 15
第一轮比较之后:
36 24 78 15
第二轮比较之后:
34 26 75 18
第三轮比较之后:
34 26 75 18
此时得到8为最大值,6为第二大值。如何backtrack呢?

you
of

【在 I**********s 的大作中提到】
: I think so. For each comparison, swap the bigger one to right. This way you
: keep track of previous information, which is helpful when do second round of
: comparison. The cons is you changed the structure of the original list.

avatar
K*g
7
这个不就是搜索一遍就可以了吗?第二大的元素中间就可以记录下来 O(n),我不懂
这个题有什么好讨论的。
avatar
I*s
8
O, 我的想法有错. 这样需要n/2 - 1比较, 尽管不需要额外空间.

【在 j***n 的大作中提到】
: 能举个例子么?
: 比如:
: 63 24 78 15
: 第一轮比较之后:
: 36 24 78 15
: 第二轮比较之后:
: 34 26 75 18
: 第三轮比较之后:
: 34 26 75 18
: 此时得到8为最大值,6为第二大值。如何backtrack呢?

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