注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号
x
Today I had a mock interview in Google
The problem is as follows:
An art museum has the shape of a square and it contains N*N rooms. Some of the rooms are open and they contain art, other rooms are locked. There are guards in some of the open rooms. The museum's administration is afraid of a break in and they would like to evaluate how well the guards are positioned in the open rooms inside the museum. Precisely, they wish to know for each open room what is the distance to the colest guard. This distance is the min number of rooms a guard needs to pass through to reach that room. The guards can only move through the open rooms North, South, East and West and they can't leave the museum.
'.' is for open room 'G' is for open room where a guard is '#' is for a locked room Noboday can enter or pass through thesse rooms.
我第一次谷歌mock interview, 没有任何经验,由于博士期间没有做算法设计方面的research 也没有warm-up
看到题目的第一瞬间是崩溃的,但是我和面试官积极的communication, 突然在最后的15分钟内,我脑子里忽然蹦出了一个非常好的算法idea 把这道题给解决了。
我的经验是,大家不要紧张,冷静思考,总会有好的idea 出现。 但是还是要认真刷题哈哈哈。 我根本没开始刷题,因为我还没打算面试谷歌家的软件工程师
|