亚麻温哥华onsite

avatar 195253
rk_jh
3263
5
做了个onlineassessment,具体题目不记得了。
onsite总共五轮加lunch

1. Read integers from a stream. When report() API gets called, return all the segments of integers that are covered. Eg 1,3,2,5,6 report() -> [(1,3), (5,6)]

The solution is to use a segment tree to keep track of segments that are covered. Tree node has (start, end) tuple. Update the tree node recursively with the incoming integer.

Then he asked me about the complexity, balancing the tree e.t.c

2. Behavioral.

3. Given a 2D grid of chars and a string, check if the string is can be found in the grid. You can start from any cell and connect to any surrounding cells. DFS with many nuances. eg can we reuse a cell?

4. System design question. Designing a simple EC2 spawn interface, analyze how, when, where the system would fail and how to improve.

5. OOP Coding round. Design a system where fulfillment can send packages to lockers and users can retrieve it. Coded some classes, data model, APIs e.t.c

总体来说不难,behavior得有好故事。每一轮前15分钟都是讲故事。我之前的工作有好多project可以讲。面下来基本上都讲完了。。。。。
  • 11
5条回复