seanren7
BAN USER
- 10of 10 votes
AnswersConsider a hash table with M slots. Suppose hash value is uniformly distributed between 1 to M, and it uses linked list to handle conflicts (if two keys hashed to the same slot). Suppose we put N keys into this M-slotted hash table, what is the probability that there will be a slot with i elements? i could vary from 0 to N.
- seanren7 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Hash Table - 1of 3 votes
AnswersHow to find medium of 1 billion numbers across N distributed machines efficiently?
- seanren7 in United States| Report Duplicate | Flag | PURGE
Google SDE-2 Algorithm - 0of 0 votes
AnswersSuppose there is a new alphabet, eg. the original alphabet is (a b c d ...x,y,z), and the new one is (e k f a ....,o,p,q). Given file in which each line contains a single word and the words are sorted in the new alphabetic order.
- seanren7 in United States
e.g., a possible file according to the new alphabet is:
ek
kq
fo
fp
fq
aj
Use the file to reconstruct the new alphabet for as much as possible.| Report Duplicate | Flag | PURGE
Algorithm
That means find out what the new alphabet is.
- seanren7 August 03, 2013We know the old alphabet is (a, b, c, ...., z) which is the English alphabet, and the new alphabet is what we want to find out.