Google 8/11电面

原帖地址:一亩三分地

让生成一个迷宫,size是n,规则写在下面
XOXOX XOXOXOX O OO O O XOX XX X X n O OO O X XOXO*XOXOX O O XOX X X O O O XOXOXOX
n
Pick a starting X, including any new walls that have been addedRandom walk two spaces in a random valid directionLoop back to #1Terminate when all areas filled
一开始听不太清楚他说什么,理解了半天才知道他想要我干嘛。写完面试官说it’s out of time. 问问题啥也不说了,让我去哭会