注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
分享一下roblox挂经,希望对大家有帮助,目前还在面试中,求米!
roblox我是三年full time经验海投的,作为社招,不知道为啥先给我安排了一个online assessment,主要是玩他们的益智小游戏+答一些behavior题。
这个我有点想吐槽,还得专门下载roblox app玩这些游戏。第一个游戏是factory optimizing,就是不同的生产线有好几个checkpoint,然后换不同input数量,maximize output。第二个游戏是设计一个robot车,要跨过不同的地形,比如雪山,灌木等。第三轮是一些behavior问题,比如project快due了然后发现之前设计有问题咋办(单选题)
说实话没觉得我玩的特别好,但是还是过了。不过我个人觉得这些游戏非常没有意义,完全不能体现一个engineer的水平。
然后进入正式店面,分享一下题目, 分别是match 3和search autocomplete。没来得及做完其中一题的followup,但是我感觉面试官人都挺好的,给了hint。
Match-3 Grid
You’re given angrid of positive integers. A match is 3 or more equal values in a row, side by side, either horizontally or vertically.
Part 1: Find the matchesReturn a list offor every match in the grid.
- List all horizontal matches first, scanning rows top to bottom and each row left to right.
- Then list all vertical matches, scanning columns left to right and each column top to“app” at t=6: “apple” and “app” were each searched 2 times. “apple” was first searched earlier (t=1 vs t=2), so it ranks first. “apply” was searched once and is cut off by.
- “app” at t=7: “app” now has 3 searches, so it moves ahead of “apple”.
- “b” at t=5: only “banana” matches.
- “c” at t=10: nothing matches, so the list is empty
对每个 prefix,先 filter 出 timestamp ≤ 当前时间且的 query,用 hashmap 统计每个 query 的 count 和 earliest timestamp。然后按- (-count, earliestTimestamp, query)
复制代码 放进 heap,取前个。重点是 tuple 的顺序正好对应三层 tie-breaking 规则。
如果有帮助请给大米! |