问几道Google onsite 的问题# JobHunting - 待字闺中
b*e
1 楼
1. Multiple threads can publish and receive each other's message: whenever a
thread publishes a message, all the other threads can receive and print out
that message; if multiple message get published, the messages should be
queued or whatever recorded and other threads can print out the message one
by one; no published message should be missed by any other threads.
2. Give a list of documents, find the minimal document set that cannot be
covered by the other documents, like
“a b c h j”, "c d”, “a b c” “a f g” “a h j”
the result should be "a b c h j" "c d" and "a f g"
3. Design a system to return the top 10 Google query that occurred before
certain time.
thread publishes a message, all the other threads can receive and print out
that message; if multiple message get published, the messages should be
queued or whatever recorded and other threads can print out the message one
by one; no published message should be missed by any other threads.
2. Give a list of documents, find the minimal document set that cannot be
covered by the other documents, like
“a b c h j”, "c d”, “a b c” “a f g” “a h j”
the result should be "a b c h j" "c d" and "a f g"
3. Design a system to return the top 10 Google query that occurred before
certain time.