Redian新闻
>
在中国和欧洲,都用什么CREDIT 和DEBIT卡?
avatar
在中国和欧洲,都用什么CREDIT 和DEBIT卡?# Money - 海外理财
V*i
1
在merge sort中,需要设一个sentinel,大家都是用什么的?在现实编程中,你一般已
经知道了值的范围,所以随便设个很大的数就可以了,但总觉得这在面试中不够严谨,
大家是怎么办的?我试过numerical_limit<>::max(),但发觉很慢。
类似的是,在hash table open addressing算法中,需要设nil和delete,大家是设成
什么的?
avatar
b*z
2
到有2个无手续费的
avatar
d*e
3
merge sort, sentinel? 为什么?

【在 V*****i 的大作中提到】
: 在merge sort中,需要设一个sentinel,大家都是用什么的?在现实编程中,你一般已
: 经知道了值的范围,所以随便设个很大的数就可以了,但总觉得这在面试中不够严谨,
: 大家是怎么办的?我试过numerical_limit<>::max(),但发觉很慢。
: 类似的是,在hash table open addressing算法中,需要设nil和delete,大家是设成
: 什么的?

avatar
j*o
4
DISCOVER
CHASE SAPPHIRE PREFERRED
CAPITAL ONE的VISA或MASTER
FIDELITY MY SMART CASH DEBIT CARD
欧洲和中国基本同上.欧洲如果收DINERS CLUB的地方,你也可以用DISCOVER.
avatar
a*c
5
is the sentinel for some kind of bound checking? can you give an
example?

【在 V*****i 的大作中提到】
: 在merge sort中,需要设一个sentinel,大家都是用什么的?在现实编程中,你一般已
: 经知道了值的范围,所以随便设个很大的数就可以了,但总觉得这在面试中不够严谨,
: 大家是怎么办的?我试过numerical_limit<>::max(),但发觉很慢。
: 类似的是,在hash table open addressing算法中,需要设nil和delete,大家是设成
: 什么的?

avatar
b*z
6
discover 好的哪里?
准备用 citi premier and schwab
avatar
V*i
7
Yes, this is my code. You have to have a sentinel, otherwise you need to do
some additional bound-checking.
void merge_sort(int* num, int N) {
if (N<=1) return;
int nl = N/2;
int nr = N-nl;
merge_sort(num, nl);
merge_sort(num+nl, nr);
int* left = new int[nl+1];
int* right = new int[nr+1];
for (int i=0; ifor (int i=nl; ileft[nl] = numeric_limits::max();
right[nr] = numeric_limits::max();
int pl = 0, pr = 0;
for (int i=0; iif (left[pl]else num[i] = right[pr++];
delete[] left;
delete[] right;
}

【在 a***c 的大作中提到】
: is the sentinel for some kind of bound checking? can you give an
: example?

avatar
j*o
8

DISCOVER在国内是银联的合作伙伴.能刷银联不能刷VISA/MASTER的地方都能刷DISCOVER.

【在 b****z 的大作中提到】
: discover 好的哪里?
: 准备用 citi premier and schwab

avatar
a*c
9
exactly what bound? check for integer overflow?

need to do

【在 V*****i 的大作中提到】
: Yes, this is my code. You have to have a sentinel, otherwise you need to do
: some additional bound-checking.
: void merge_sort(int* num, int N) {
: if (N<=1) return;
: int nl = N/2;
: int nr = N-nl;
: merge_sort(num, nl);
: merge_sort(num+nl, nr);
: int* left = new int[nl+1];
: int* right = new int[nr+1];

avatar
b*z
10
那有 手续费吗
所以DISCOVER在国内都接受?

DISCOVER.

【在 j********o 的大作中提到】
:
: DISCOVER在国内是银联的合作伙伴.能刷银联不能刷VISA/MASTER的地方都能刷DISCOVER.

avatar
s*e
11
所以你说的sentinel的意思是左右两个array中一个array走到尽头之后,append一个很大的数在最尾端
确保之后都从另外一个array取数?
这样看的话,sentinel好像不是必须的啊
这一段代码:
for (int i=0; iif (left[pl]else num[i] = right[pr++];
是否可以改成
for (int i=0; i{
if (pl>=nl) num[i]=right[pr++];
else if (pr>=nr) num[i]=left[pl++];
else if (left[pl]else num[i] = right[pr++];
}

do

【在 V*****i 的大作中提到】
: Yes, this is my code. You have to have a sentinel, otherwise you need to do
: some additional bound-checking.
: void merge_sort(int* num, int N) {
: if (N<=1) return;
: int nl = N/2;
: int nr = N-nl;
: merge_sort(num, nl);
: merge_sort(num+nl, nr);
: int* left = new int[nl+1];
: int* right = new int[nr+1];

avatar
t*e
12
fidelity 和 boa的debit card哪个好?

【在 j********o 的大作中提到】
: DISCOVER
: CHASE SAPPHIRE PREFERRED
: CAPITAL ONE的VISA或MASTER
: FIDELITY MY SMART CASH DEBIT CARD
: 欧洲和中国基本同上.欧洲如果收DINERS CLUB的地方,你也可以用DISCOVER.

avatar
V*i
13
Yes, that's what I mean.
Your solution made two more comparison each iteration. I don't think the
interviewer will like that. The reason of using sentinel is to reduce
comparison.

很大的数在最尾端

【在 s*******e 的大作中提到】
: 所以你说的sentinel的意思是左右两个array中一个array走到尽头之后,append一个很大的数在最尾端
: 确保之后都从另外一个array取数?
: 这样看的话,sentinel好像不是必须的啊
: 这一段代码:
: for (int i=0; i: if (left[pl]: else num[i] = right[pr++];
: 是否可以改成
: for (int i=0; i: {

avatar
j*o
14

BOA DEBIT限建行免费且不同的建行网点YMMV.
FIDELITY任意ATM.当然,手续费是先被ATM OWNER CHARGE然后FIDELITY REBATE给你.

【在 t****e 的大作中提到】
: fidelity 和 boa的debit card哪个好?
avatar
s*e
15
OK. So how about:
for (int i=0; ifor (int i=nl; ileft[nl] = right[nr-1] + 1;
right[nr] = left[nl-1] + 1;
Since left is sorted, right is sorted,
and you just want to make sure that the sentinel of left is larger than
everything in right
and the sentinel of right is larger than everything in left

【在 V*****i 的大作中提到】
: Yes, that's what I mean.
: Your solution made two more comparison each iteration. I don't think the
: interviewer will like that. The reason of using sentinel is to reduce
: comparison.
:
: 很大的数在最尾端

avatar
B*5
16
Credit: Sapphire
Debit: BOA
过两天就靠这两个了
avatar
s*1
17
Credit Card就算没有Foreign Transaction Fee
汇率一般也不太好,比Debit Card Local ATM取现低3%左右
建议找没有手续费的ATM取现花
单笔大额消费可以考虑刷CC
avatar
s*g
18
discover没有境外手续费
国内不受外卡的地方 discover可以走银联通道刷
所以比较好用

【在 b****z 的大作中提到】
: 那有 手续费吗
: 所以DISCOVER在国内都接受?
:
: DISCOVER.

avatar
z*r
19
谁家的credit card汇率不好?capitalone家的反正很好。。。用他家卡的唯一原因了
。。。

【在 s********1 的大作中提到】
: Credit Card就算没有Foreign Transaction Fee
: 汇率一般也不太好,比Debit Card Local ATM取现低3%左右
: 建议找没有手续费的ATM取现花
: 单笔大额消费可以考虑刷CC

avatar
t*e
20
多谢解答。
看了一下两家的网页,好像都免不了1%的foreign transaction fee?

【在 j********o 的大作中提到】
:
: BOA DEBIT限建行免费且不同的建行网点YMMV.
: FIDELITY任意ATM.当然,手续费是先被ATM OWNER CHARGE然后FIDELITY REBATE给你.

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