Coding:
Remove Adjacent Duplicates, LeetCode 1047. The follow-up was similar to 1209, but without the k requirement: remove all duplicates. The interviewer's hint was to use a flag to track the repeated character and control removal. I did not get it at the time. For some reason I insisted on showing off with an extra count array. One test case failed, and I did not manage to fix it. The interviewer was disappointed, and I knew then that it was over.
Two ascending arrays, such as [1, 3, 5] and [2, 4, 6]. Produce one ascending array containing the squares of their elements. I asked whether negative numbers mattered, and the interviewer said that was the follow-up. I finished the initial version immediately. For the second, I said I would first merge the arrays, then use pointers at the left and right ends to compare absolute values and order the result. The interviewer was not very satisfied, and we moved to Q&A before I finished writing it.
System design: Design a donation system. The campaign lasts only seven days, and there is already a payment provider. I asked about requirements and was told to consider only US dollars and only the US. I think DAU was 400 million, with 100 million payments a day. I did not need to design how the money reaches charities. This was very similar to DoorDash's classic three-day donation-design question. At the end, the interviewer asked whether we could do without message queues in several places. We could not control the bank's processing latency, so what if it was too slow? I said we could do something in the UI, such as tell the user it was processing and send an email later if it failed. With ten minutes left, the interviewer wanted to move to Q&A. I said there were still places we could dive deeper or discuss failure recovery, but the interviewer said that was unnecessary. We finished after Q&A.
I have started preparing for interviews again. It is comforting that I have not forgotten all my system-design knowledge. What worries me is that I normally use AI to write code and can barely find my IDE anymore. I lost the old craft of writing code by hand long ago, and in the interview I could barely react or think. The recruiter did not later say exactly where I had failed.
Discussion
Loading comments…