Redian新闻
>
现在给国内分享视频用什么网站啊?
avatar
现在给国内分享视频用什么网站啊?# Hardware - 计算机硬件
f*y
1
45 min, use google doc and phone.
1. write a function isAngram(String s1, String s2) ==> boolean
what's the complexity? how to improve it
2. write a function dayOfWeek("01-08-2010") return "Sunday"
3. in the case of google book, there might be multiple copies for a title, if user search for this book,
how to decide which one to return?
4. in the case that there are multiple servers doing question 3, how to
synchronize the result?
avatar
r*6
2
今天收到email说可以拿到20刀得gift card,各位童鞋,注意email啊。
如下:
Congratulations! Your online spending paid off. You've earned a $20
MasterCard gift card.
Click on the link below to be eligible to get your MasterCard gift card,
while supplies last.
avatar
w*t
3
刚搬了家,儿女买了高清电视孝敬我们老俩口,原以为能看到高清频道的, 可是如果
电视台播出的不是高清节目,高清电视就成了摆设。英文频道固然有高清的, 我年纪
大了,英文不好,也看不懂。中文电视什么时候能看上高清频道,还是个未知数呢。只
能说儿女为我们老两口看高清电视做好了准备。希望能早日在电视上看到中文的高清频
道。
avatar
n*h
4
用过一次土豆,不行。视频会变成窄窄的一条,不知如何解决。
avatar
s*t
5
4是啥意思?

【在 f*******y 的大作中提到】
: 45 min, use google doc and phone.
: 1. write a function isAngram(String s1, String s2) ==> boolean
: what's the complexity? how to improve it
: 2. write a function dayOfWeek("01-08-2010") return "Sunday"
: 3. in the case of google book, there might be multiple copies for a title, if user search for this book,
: how to decide which one to return?
: 4. in the case that there are multiple servers doing question 3, how to
: synchronize the result?

avatar
g*i
6
cong

【在 r********6 的大作中提到】
: 今天收到email说可以拿到20刀得gift card,各位童鞋,注意email啊。
: 如下:
: Congratulations! Your online spending paid off. You've earned a $20
: MasterCard gift card.
: Click on the link below to be eligible to get your MasterCard gift card,
: while supplies last.

avatar
m*k
7
现在基本都是高清的。不贵

【在 w*****t 的大作中提到】
: 刚搬了家,儿女买了高清电视孝敬我们老俩口,原以为能看到高清频道的, 可是如果
: 电视台播出的不是高清节目,高清电视就成了摆设。英文频道固然有高清的, 我年纪
: 大了,英文不好,也看不懂。中文电视什么时候能看上高清频道,还是个未知数呢。只
: 能说儿女为我们老两口看高清电视做好了准备。希望能早日在电视上看到中文的高清频
: 道。

avatar
w*x
8
试试youku
avatar
l*e
9
第3问啥意思?

【在 f*******y 的大作中提到】
: 45 min, use google doc and phone.
: 1. write a function isAngram(String s1, String s2) ==> boolean
: what's the complexity? how to improve it
: 2. write a function dayOfWeek("01-08-2010") return "Sunday"
: 3. in the case of google book, there might be multiple copies for a title, if user search for this book,
: how to decide which one to return?
: 4. in the case that there are multiple servers doing question 3, how to
: synchronize the result?

avatar
s*r
10
那是你前一段时间注册的花200返20 ......
avatar
b*g
11
直觉是广告贴
一会儿就有人说订哪个哪个套装

【在 w*****t 的大作中提到】
: 刚搬了家,儿女买了高清电视孝敬我们老俩口,原以为能看到高清频道的, 可是如果
: 电视台播出的不是高清节目,高清电视就成了摆设。英文频道固然有高清的, 我年纪
: 大了,英文不好,也看不懂。中文电视什么时候能看上高清频道,还是个未知数呢。只
: 能说儿女为我们老两口看高清电视做好了准备。希望能早日在电视上看到中文的高清频
: 道。

avatar
f*y
12
问题4 时候问题3 的延续。 我给问题3 的回答是用一个priority list,depends on
user's action increase the count for a book. then he asked me if there
are multiple servers, how to synchronize this list? my answer to that is I
assume these servers are accessing the same database, he said, that makes
sense :)
avatar
r*6
13
是啊,最近搞AMEX把这个都忘了。

【在 s*******r 的大作中提到】
: 那是你前一段时间注册的花200返20 ......
avatar
y*u
14
赞犀利

【在 b***g 的大作中提到】
: 直觉是广告贴
: 一会儿就有人说订哪个哪个套装

avatar
f*y
15
sorry, 我没写全, 刚刚改了, 再看一遍吧

【在 l******e 的大作中提到】
: 第3问啥意思?
avatar
P*s
16
人家扔了一只靴子,被你一说,另外一只靴子砸手里了。。。

【在 b***g 的大作中提到】
: 直觉是广告贴
: 一会儿就有人说订哪个哪个套装

avatar
x*y
17
for 3, popularity? for 4, combine all the # of searches from the servers
together?

【在 f*******y 的大作中提到】
: 45 min, use google doc and phone.
: 1. write a function isAngram(String s1, String s2) ==> boolean
: what's the complexity? how to improve it
: 2. write a function dayOfWeek("01-08-2010") return "Sunday"
: 3. in the case of google book, there might be multiple copies for a title, if user search for this book,
: how to decide which one to return?
: 4. in the case that there are multiple servers doing question 3, how to
: synchronize the result?

avatar
m*k
18
faint.我咋这么单纯!

【在 P***s 的大作中提到】
: 人家扔了一只靴子,被你一说,另外一只靴子砸手里了。。。
avatar
s*t
19
support

【在 x***y 的大作中提到】
: for 3, popularity? for 4, combine all the # of searches from the servers
: together?

avatar
l*a
20
faint,我查了一下,还真是。。。

【在 b***g 的大作中提到】
: 直觉是广告贴
: 一会儿就有人说订哪个哪个套装

avatar
I*A
21
这个第二题,你是怎么做的?
多谢!

if user search for this book,

【在 f*******y 的大作中提到】
: 45 min, use google doc and phone.
: 1. write a function isAngram(String s1, String s2) ==> boolean
: what's the complexity? how to improve it
: 2. write a function dayOfWeek("01-08-2010") return "Sunday"
: 3. in the case of google book, there might be multiple copies for a title, if user search for this book,
: how to decide which one to return?
: 4. in the case that there are multiple servers doing question 3, how to
: synchronize the result?

avatar
P*s
22
你比我们nice啊

【在 m**k 的大作中提到】
: faint.我咋这么单纯!
avatar
z*n
23
这题输入不可能只有那一个日期吧,因为日期是死的,星期几是人为定义的,至少先有
个起始条件说明某个日期是星期几才能做出来。
除非允许用系统函数查

【在 I**A 的大作中提到】
: 这个第二题,你是怎么做的?
: 多谢!
:
: if user search for this book,

avatar
r*n
24
LOL
夏普

【在 P***s 的大作中提到】
: 人家扔了一只靴子,被你一说,另外一只靴子砸手里了。。。
avatar
I*A
25
所以才问哪。。。

【在 z****n 的大作中提到】
: 这题输入不可能只有那一个日期吧,因为日期是死的,星期几是人为定义的,至少先有
: 个起始条件说明某个日期是星期几才能做出来。
: 除非允许用系统函数查

avatar
B*y
26
那个广告不就在楼主的帖子下面么?
avatar
K*g
27
我的代码
/*write a function dayOfWeek("01-08-2010") return "Sunday"*/
//assuming the base date is xxxx year Jan 1st
enum weekday {Sun=0, Mon=1, Tue=2, ...}
int dayOfWeek(char* str)
{
if(str == NULL) return;
int month = atoi(str);
int day = atoi(str[3]);
int year = atoi(str[6]);

int days = (year - base_year)*365 + howManyLeapYears(year, baseyear);
days += daysStartingThisYear(month, day, year);
return (days%7+base_weekday)%7;
}
int daysStartingThisYear(int month, int d

【在 I**A 的大作中提到】
: 所以才问哪。。。
avatar
m*a
28
赞火眼晶晶!
avatar
I*A
29
可能这道题就已经assume了01-01-2010是sunday了(因为01-08-2010 will return
Sunday。

【在 K******g 的大作中提到】
: 我的代码
: /*write a function dayOfWeek("01-08-2010") return "Sunday"*/
: //assuming the base date is xxxx year Jan 1st
: enum weekday {Sun=0, Mon=1, Tue=2, ...}
: int dayOfWeek(char* str)
: {
: if(str == NULL) return;
: int month = atoi(str);
: int day = atoi(str[3]);
: int year = atoi(str[6]);

avatar
n*p
30
哪个套装比较好?LOL

【在 b***g 的大作中提到】
: 直觉是广告贴
: 一会儿就有人说订哪个哪个套装

avatar
y*e
31
第一题好做,O(n)的复杂度。count sort这两个string即可。
如果2个string都是字典里面挑选出来的单词的话,可以预先处理整个字典做成一个
hashtable,那么查询isAnagram可以达到O(1)了。
第二题,这个大概是问日历这玩意是怎么实现的。给定一个基点,比如1970年1月1日,
是星期几,然后根据输入的日期间隔的日子来推算星期。
第三题是个开放题。有很多可以跟面官讨论的。比如,用户输入了一个Title,找出跟
多本书来:
究竟是同一本书的不同版本呢,还是几个一模一样Title的书?
若是搜索引擎是做模糊查询的,比如用户输入Algorithm,可能返回Introduction to
Algorithms,也有可能返回Algorithm Design。怎么样排序呢?
看系统是否保留用户的搜索历史?比如,用户输入了一个Algorithm做了查询,点击了
返回,然后又输入了CLRS作为查询关键字?
基本上需要建立起一个给搜索结果排序的打分标准。
若是一本书的不同版本,而且用户输入之中没有数字或者版本号,那么按照最新到比较
旧的排序。若是不同的书,则是参考相似度。可
avatar
e*e
32
赞一针见血

【在 b***g 的大作中提到】
: 直觉是广告贴
: 一会儿就有人说订哪个哪个套装

avatar
t*q
33
int dayOfWeek(const char* str) {
int y, m, d;
sscanf(str, "%d-%d-%d", &m, &d, &y);
int w = y + y/4 - y/100 + y/400 + d - 1;
for (int i = 1; i < m; ++i) {
if (i == 2)
w += /* 28 + */ y % 4 == 0 && (y % 100 || y % 400 ==0);
else
w += 30 + (i % 2 ^ i >= 8);
}
return w % 7;
}

【在 K******g 的大作中提到】
: 我的代码
: /*write a function dayOfWeek("01-08-2010") return "Sunday"*/
: //assuming the base date is xxxx year Jan 1st
: enum weekday {Sun=0, Mon=1, Tue=2, ...}
: int dayOfWeek(char* str)
: {
: if(str == NULL) return;
: int month = atoi(str);
: int day = atoi(str[3]);
: int year = atoi(str[6]);

avatar
x*l
34
既然是advertisement,那就早点把他打发了,卫星电视,有线电视,麒麟电视,
italkbb.自己去选吧,还有什么大家告诉他。。。。。。。
avatar
y*i
35
KAO
还有这么矫情的父母啊?您确定不是坑么?

【在 w*****t 的大作中提到】
: 刚搬了家,儿女买了高清电视孝敬我们老俩口,原以为能看到高清频道的, 可是如果
: 电视台播出的不是高清节目,高清电视就成了摆设。英文频道固然有高清的, 我年纪
: 大了,英文不好,也看不懂。中文电视什么时候能看上高清频道,还是个未知数呢。只
: 能说儿女为我们老两口看高清电视做好了准备。希望能早日在电视上看到中文的高清频
: 道。

avatar
w*t
36
说我矫情,就算是吧,说这是坑,坑到你了吗?坑你什么了啊?

【在 y****i 的大作中提到】
: KAO
: 还有这么矫情的父母啊?您确定不是坑么?

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