|
2015(4-6月) 码农类General 硕士 实习@Amazon - 内推 - 技术电面 | Other |
// Write a function to “flood fill” a bitmap, function should allow controlling level of flood fill.
. visit 1point3acres.com for more.
// A[5][5] of integers where each cell can have only 0/1. If it's 0, its not flodded yet, if it's 1, its already flooded.. visit 1point3acres.com for more.
// water at point p at time t1,.鏈枃鍘熷垱鑷1point3acres璁哄潧
// p, p's neighbors at time t2 (t1+x)
// p, p's neighbors, p's neighbors' neighbors -> at time t3 (t2+x)
// current cell (i, j) => i-1, j or i, j+1, or i, j-1, or i+1, j or i+1, j+1 or i-1, j-1
// input: 2d array(filled, but ), starting cell (i, j), level of flooding (1,2,3....)
--------------------
刚刚面完,已经对阿三无语了!这几天我看了所有亚麻能看的面经,总结了大概三四十道题,看面经都是什么leetcode原题啊cc150原题啊!我是2PT面的,大概提前15min我还上地里来看到一个亲刚面完发了个热腾腾的面经。可是我真的第一次听说这道面试题!. from: 1point3acres.com/bbs
看他粘上这道题,第一反应就懵了,什么鬼东西!让他解释了10分钟,借此机会赶紧查。。flood fill,wiki上有个动态图我就只能照着它想了。。. visit 1point3acres.com for more.
我的思想:递归。。8个neighbors后来递归,他反正一直ok也不知对错了,发来面经求保佑!. 1point3acres.com/bbs
----
面完我只想说这几天Amazon的面经我真的白看了!
补充内容 (2015-2-5 21:05):
今天收到邮件给挂了!唉……只能怪自己准备的还不充分! |
评分
-
3
查看全部评分
-
|