Overall it wasn't too hard — three coding rounds, one system design round, and one BQ round — but the system design round was really brutal... Here are the details:
-
Coding: I'd never seen this one before. They give you a pre-written class that has a
next()function — each call returns a string, roughly like this:
"one//ntw", "o//n", "three//nfour", "//nfi", "ve"
You're supposed to write your own function that calls this pre-built class, and the output needs to account for the line breaks embedded in the given strings, so the correct output should be:
"one", "two", "three" ...
Because of this, I didn't fully understand the edge cases of Java's split, so I ended up spending a lot of time debugging... I probably failed this round. -
System design: This one was also really confusing — they had me design something like Amazon S3 blob storage... Not sure if my question bank just didn't cover it or if this question was just unusual, but I hadn't prepared for it and could only bs my way through it... This round also went badly.
-
HM BQ: Not much to say, just talked about projects.
-
Board and pin: An old question, solved with BFS.
-
Account balance: Roughly like this:
Problem (not the minimum-transaction-count version):
- Given a list of transactions transactions[k] = {from, to, amount}, output any valid settlement plan
- paybacks[m] = {payer, receiver, amount} such that everyone's net balance is cleared to zero.
- Note: it does NOT require the "minimum number of transactions" — any feasible plan works.
The only twist was that in the given transaction list, "to" could have multiple people, but that wasn't really difficult either.
Overall the difficulty really wasn't that high. It's just that the edge cases in splitting the string in the first question, and the system design round, left me pretty confused, so it still stung a bit... Hope this helps.
Discussion
Loading comments…