The technical screening round overall was pretty simple. They give you a function query signature and have you determine whether there's a registered function that matches it. Later on this expands to cases involving optional arguments and variable number of arguments.
The onsite had four rounds total.
The first coding round was to implement something like printing the last N lines of a file, along with discussing tradeoffs and optimizations — for example whether to use a buffer or a file pointer offset. The second half was more theoretical: they give you a set of file APIs, things like reading N bytes, moving the file pointer by +N or -N, and getting the file size. You need to write pseudocode to implement the functionality. They also required the result to be streamed to stdout rather than being stored entirely in memory at once.
The second coding round was to implement a random queue — basically a normal queue, but each call returns a random element. Then we discussed how to determine whether two random queues are equal, and what issues need to be considered in a multithreading scenario. Taking it further, if the queue is stored using variable run-length encoding, how should you compare whether they're equal.
The first system design question was a fairly standard aggregate news feed. The interviewer focused mostly on API design questions, like REST vs RPC, and how to support different types of clients, like mobile.
The second system design was to design a temporary email system. There were two pretty hard points. The first was how to generate random email usernames that look like they belong to a real person, to avoid getting rejected by the system. My approach at the time was to use an English dictionary and concatenate word fragments. The second was how to quickly determine whether an email has already been used. I proposed using a bloom filter. But the problem is the number of emails generated per day is huge, and we don't want to delete or expire these emails, so continuously generating email names that are both "human-looking" and non-duplicate is actually quite challenging.
In the end the recruiter told me both coding rounds passed, but both system design rounds didn't pass — though not by much. They said based on my performance I could reapply earlier than the normal waiting period.
Discussion
Loading comments…