Pergunta de entrevista da empresa Microsoft

Searching a page in 100 million pages. What data structure would be optimal?

Respostas da entrevista

Sigiloso

1 de nov. de 2009

B or B+ trees

Sigiloso

28 de ago. de 2011

Hashing is much better. The obtained buckets can be distributed on a very large number of machines (a machine can have more than one bucket but no bucket is split among machines). Then each time a page is desired a quick hash function computation points straight to the right machine and the right smallish file on disk (or in memory) on that machine which is queried to find the page in question. So hashing makes massive distribution very easy and very efficient.

Sigiloso

17 de jan. de 2010

b or b+ tree seems as most obvious answer but you wont be able to store such a large amount of data in memory so it would be better to go for hashing of two level or more level something used in databases check silberschatz book on data base