贡献两道google面试题# JobHunting - 待字闺中
h*8
1 楼
1。 Suppose we have a stream of web clicks. Now you need to provide at any
time the count of web clicks during the past 1 minute. To be specific, you
get informed whenever a web click happens. You need to provide a function "
getCount()" such that once called, return the count of clicks during the
past 1 minute. The solution will be both constant in time and space.
2。 N * N MATRIX, 只有一行完全是 0, 其他行有 0 也有 1, 怎么最快找到完全是 0
的那一行. 平均O()和 WORST CASE O() 是多少?
time the count of web clicks during the past 1 minute. To be specific, you
get informed whenever a web click happens. You need to provide a function "
getCount()" such that once called, return the count of clicks during the
past 1 minute. The solution will be both constant in time and space.
2。 N * N MATRIX, 只有一行完全是 0, 其他行有 0 也有 1, 怎么最快找到完全是 0
的那一行. 平均O()和 WORST CASE O() 是多少?