b*y
2 楼
A graph is given. You need to design a data structure with minimum space
complexity such that it does the follows
complexity such that it does the follows
k*i
3 楼
两子弟在长安街斗殴,一子弟曰:你等着,我爹是敏感词。另一子弟听后一笑:你丫牛逼个屁,你爹敏感词,我爹在Google搜索连接被重置。
c*2
5 楼
"Finds whether nodes u and v have a path in between them in O(1) time."
Change path to adjacency or path with length 1? Otherwise, not quite
possible to do that in O(1)
Change path to adjacency or path with length 1? Otherwise, not quite
possible to do that in O(1)
H*7
6 楼
不懂
i*n
7 楼
建议直接上芝麻粉
b*y
8 楼
是careercup 上面amazon的一道题
http://www.careercup.com/question?id=3214677
Finds whether nodes u and v have a path in between them in O(1) time
用adjacency matrix可以实现;
Finds whether there is a path of length k between u and v in O(k)
这个不是很明白。
careercup上面也没讨论清楚。
http://www.careercup.com/question?id=3214677
Finds whether nodes u and v have a path in between them in O(1) time
用adjacency matrix可以实现;
Finds whether there is a path of length k between u and v in O(k)
这个不是很明白。
careercup上面也没讨论清楚。
b*y
11 楼
ch222, I see what you mean...
normal adjacency matrix cannot find whether u,v have a path in O(1) time; it
can, if and only if the length of the path is 1 (i.e., adjecent).
normal adjacency matrix cannot find whether u,v have a path in O(1) time; it
can, if and only if the length of the path is 1 (i.e., adjecent).
p*e
12 楼
两个斑竹是搜索结果可能涉及不符合相关法律法规和政策的内容,未予显示。
l*s
13 楼
我用这个
http://www.amazon.com/Zojirushi-Automatic-Sesame-Seed-Grinder/d
【在 j******y 的大作中提到】
: 想用碎芝麻包花卷,但挺难搞碎,有什么机器推荐吗?
: 家里有blender,不知道能捣碎吗?
http://www.amazon.com/Zojirushi-Automatic-Sesame-Seed-Grinder/d
【在 j******y 的大作中提到】
: 想用碎芝麻包花卷,但挺难搞碎,有什么机器推荐吗?
: 家里有blender,不知道能捣碎吗?
a*o
15 楼
好东西呀,好用吗,心动
【在 l**s 的大作中提到】
: 我用这个
: http://www.amazon.com/Zojirushi-Automatic-Sesame-Seed-Grinder/d
【在 l**s 的大作中提到】
: 我用这个
: http://www.amazon.com/Zojirushi-Automatic-Sesame-Seed-Grinder/d
j*y
17 楼
是把芝麻炒熟后再grind的吗?
谢谢!
【在 l**s 的大作中提到】
: 我用这个
: http://www.amazon.com/Zojirushi-Automatic-Sesame-Seed-Grinder/d
谢谢!
【在 l**s 的大作中提到】
: 我用这个
: http://www.amazon.com/Zojirushi-Automatic-Sesame-Seed-Grinder/d
b*y
18 楼
if it the "path" is the shortest path,
we can use adjacency matrix, each entry a[u][v] stores the length the
shortest path from u to v.
if u->v has no path, then set a[u][v] = -1
In this way, we can tell whether this is a path from u to v in O(1) by
checking if the entry is -1; we can also tell in O(1) whether there is a
shortest path of length k by checking whether the value of the entry is k.
if it the "path" is the simple path,
we can expand the adjacency matrix to be 3-D, i.e., a[u][v][i], the 3rd
dimension stores whether (1 or 0) there is a simple path of length i.
Therefore, the second operation can be done in O(1)
a[u][v][0] sets to 1 is there is no path. So, the first operation can also
be done in O(1).
But now the space complexity is O(n^3).
We can compress the 3rd dimension by using a linked list. In stead of using
a 3-D matrix, we can use a 2-D adjacency matrix, whose entry is a linked
list. A node of the linked list is i value (length of a simple path from u
to v, i.e., the i in a[u][v][i] previously). In the worst case, from u to v,
there are simple paths of length 1, 2, 3, ...,k, we can tell whether there
is a simple path of length k by traversing the linked list in O(k) time.
The space complexity is now O(k*n^2)
BTW, thanks to my advisor in China to guide me into this proposal!
we can use adjacency matrix, each entry a[u][v] stores the length the
shortest path from u to v.
if u->v has no path, then set a[u][v] = -1
In this way, we can tell whether this is a path from u to v in O(1) by
checking if the entry is -1; we can also tell in O(1) whether there is a
shortest path of length k by checking whether the value of the entry is k.
if it the "path" is the simple path,
we can expand the adjacency matrix to be 3-D, i.e., a[u][v][i], the 3rd
dimension stores whether (1 or 0) there is a simple path of length i.
Therefore, the second operation can be done in O(1)
a[u][v][0] sets to 1 is there is no path. So, the first operation can also
be done in O(1).
But now the space complexity is O(n^3).
We can compress the 3rd dimension by using a linked list. In stead of using
a 3-D matrix, we can use a 2-D adjacency matrix, whose entry is a linked
list. A node of the linked list is i value (length of a simple path from u
to v, i.e., the i in a[u][v][i] previously). In the worst case, from u to v,
there are simple paths of length 1, 2, 3, ...,k, we can tell whether there
is a simple path of length k by traversing the linked list in O(k) time.
The space complexity is now O(k*n^2)
BTW, thanks to my advisor in China to guide me into this proposal!
c*l
20 楼
and: use adjacency matrix multiplication to populate the linked list in each
matrix entry
matrix entry
x*t
23 楼
put the sesame seeds on a baking sheet, and use an empty glass bottle (beer,
wine) to roll.
wine) to roll.
P*D
24 楼
一般的food processor就可以。我一直用food processor做芝麻糊的。
另外给你讲一下我的血泪教训:芝麻这种油料作物你就不要想磨成特别细的粉了,不然
磨出来的只能是小磨香油。我第一次做芝麻糊的时候用的是coffee grinder,结果出来
的是芝麻油泥,然后coffee grinder又很难彻底拆开,你不知道我费了多大力气才把那
破玩意儿洗干净……
另外给你讲一下我的血泪教训:芝麻这种油料作物你就不要想磨成特别细的粉了,不然
磨出来的只能是小磨香油。我第一次做芝麻糊的时候用的是coffee grinder,结果出来
的是芝麻油泥,然后coffee grinder又很难彻底拆开,你不知道我费了多大力气才把那
破玩意儿洗干净……
s*k
26 楼
额
千万不能打时间长
会打出芝麻油的
我就是这么悲剧的 lol
btw
我都是用擀面杖碾 就放在塑料袋 然后像擀面一样赶来赶去 赶来赶去 当然了 要用
力 而且还要有把力气哈
千万不能打时间长
会打出芝麻油的
我就是这么悲剧的 lol
btw
我都是用擀面杖碾 就放在塑料袋 然后像擀面一样赶来赶去 赶来赶去 当然了 要用
力 而且还要有把力气哈
相关阅读
机器人笑话 -- 少女和少妇的区别哪四类男闺蜜只玩出轨不离婚(转载)老美社交网络上养生秘诀多吗?大妈摸到好牌导致列车提速朝鲜为什么敢打美国 [转载]Re: 为什么都买GL450而不买GL350? (转载)大新闻:中国可能把潜艇藏在海里 (转载)菌斑的亲们,都来说说各种奇葩外号吧 (转载)视频: 色胆包天勃起男街头泡妞!受了伤的爱情,还能维持多久?【精选段子】我默默地把丁丁往右边挪了挪…Shell的油卡上下两部分都能用?机器人又来刷板了这个逼装的很到位!(zz)ZT: 威斯康星老将在美国把房子租给天津小将的惨痛经历 (转载)逛街多巴胺上瘾的另一个替代疗法施一公:大学期间我对生物真的是深恶痛绝--by方舟子 (转载)论绝对不谈姐弟恋的重要意义神经病才觉得好笑的段子zz今天FB一老中被fire了,据说是因为带人来公司蹭饭 (转载)