tree vs hash# JobHunting - 待字闺中e*i2013-01-11 08:011 楼What I mean is some old postings are listed on the top as new postings.Why?
t*e2013-01-11 08:013 楼因为你是web浏览旧的帖子只要有人re了,就可以从海底浮上来【在 e*i 的大作中提到】: What I mean is some old postings are listed on the top as new postings.: Why?
j*y2013-01-11 08:017 楼感觉数据量大的话,用hash就很容易 collision用 balanced tree的话, 即使 n 很大, log n 的 access time 和常数也没太大的区别【在 p*****2 的大作中提到】: 感觉数据量小倒是可以用tree。
p*22013-01-11 08:019 楼数据量小的话,hash浪费空间。【在 j*****y 的大作中提到】: 感觉数据量大的话,用hash就很容易 collision: 用 balanced tree的话, 即使 n 很大, log n 的 access time 和常数也没太大的: 区别
j*y2013-01-11 08:0111 楼确实有个 balance的问题。看来这个问题也是一个 open ended的问题【在 p*****2 的大作中提到】: : 数据量小的话,hash浪费空间。
w*z2013-01-11 08:0114 楼they solve different problems. Has to discuss it within a context.【在 j*****y 的大作中提到】: 我自己也不知道, 呵呵, 一个面试题目.
h*e2013-01-11 08:0115 楼这样的题目要先问清楚应用的场合是什么,有什么assumptions和constraints,面你的人并不会看重你最后得出的结论是tree还是hash,而是看你思考和表达的过程。