Redian新闻
>
去欧洲全家旅行,哪个个信用卡旅馆点数最好?
avatar
去欧洲全家旅行,哪个个信用卡旅馆点数最好?# Money - 海外理财
n*s
1
Given a word stream, get the N words with top N highest occurance frequancy
(dynamically)
Any good approaches? Question is very open, try to explore the best space
and time complexity.
avatar
f*t
2
Marriot 好些还是HH?多谢!旅馆的档次不重要。
avatar
n*s
3
Sorry, in office, can'te type chinese , just bare with my broken english
i would say
using a Hashmap to maintain the frequence for all words.
Value is defined as this
struct Node{
int key
int counter
struct Node* next;
};
struct V{
int counter;
struct Node* pt;
};
Also maitain a sorted list using Node as linked list (Olnly allow N nodes in the
linked list, the top N frequent words). The linked list is sorted.
When processing a word, first udpate the HashMap,
than, based on the V.counter to see if
(1) V.pt is already in the linked list, see if need to move the Node via to
a new place (since the counter is increaetd by 1, and we need to keep the
linked list sorted.)
(2) V.pt is none, and LinkedList is not full (<=N). Malloc a new Node and
linked to the sorted linked List
(3) V.pt is none and Linked List is full
if V.counter is greater than the Smallest Node in the Sorted LL
free the smallest Node and insert the a new Node with V's info.
update V.pt.
Worst Time Cost for each word processing is
O(1) --> hashMap lookup
O(N) --> maintain the sorted LL
O(1) --> to update the Node's Pointer in the hashmap, need another
lookup
But a lot of time is wasted on malloc/free.
i am also considering the change the LinkedList into a Mini-Heap. but the
heap operation will involve a lot of index udpate...i am a little hesitate
to do that.
avatar
n*e
4
SPG.
3000 pts/night in London Heathrow.
4000-7000/night in whole Germany.
better rate if you use points+cash

【在 f*****t 的大作中提到】
: Marriot 好些还是HH?多谢!旅馆的档次不重要。
avatar
h*z
5
Q
请问如果账号里有足够的点,还能选points+cash 吗?

【在 n******e 的大作中提到】
: SPG.
: 3000 pts/night in London Heathrow.
: 4000-7000/night in whole Germany.
: better rate if you use points+cash

avatar
i*y
6
可以
去欧洲玩的话,首先要考虑foreign transaction fee吧,挑个没有的卡吧

【在 h**z 的大作中提到】
: Q
: 请问如果账号里有足够的点,还能选points+cash 吗?

avatar
n*e
7
you can use any card to pay for cash part, not necessarily spg card.

【在 i**y 的大作中提到】
: 可以
: 去欧洲玩的话,首先要考虑foreign transaction fee吧,挑个没有的卡吧

avatar
l*u
8
找好评多的b&b就行

【在 f*****t 的大作中提到】
: Marriot 好些还是HH?多谢!旅馆的档次不重要。
avatar
l*n
9
chase hyatt 有两晚免费,用在欧洲最划算,因为顶级的park Hyatt 大部分都在欧洲
。另外这个卡没有foreign transaction fee.
avatar
k*a
10
用现在的CARLSON 的一晚RADISSON 5万分, 一晚COUNTRY INN 4万4 ETC
然后换欧洲的酒店。。 当然要看你去那些城市。。欧洲那么大。。
avatar
f*t
11
主要是巴塞罗那和威尼斯(坐cruise)。请指点一下!多谢!

【在 k***a 的大作中提到】
: 用现在的CARLSON 的一晚RADISSON 5万分, 一晚COUNTRY INN 4万4 ETC
: 然后换欧洲的酒店。。 当然要看你去那些城市。。欧洲那么大。。

avatar
C*9
12
mark
avatar
l*1
13
如果去意大利呢?with 10 years old child. thanks.

【在 n******e 的大作中提到】
: SPG.
: 3000 pts/night in London Heathrow.
: 4000-7000/night in whole Germany.
: better rate if you use points+cash

avatar
S*i
14
我以前在巴塞罗那 用spg9000点per night定的Le Méridien Barcelona,the
position cannot be better.

【在 f*****t 的大作中提到】
: 主要是巴塞罗那和威尼斯(坐cruise)。请指点一下!多谢!
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。