TikTok SWE Intern, E-commerce Backend. Referral. One virtual round. Rejected.
Background
Applied through a referral. Position and team: E-commerce Backend.
Timeline
- 08/06 applied
- 08/07 received the OA
- 08/23 HR scheduled the interview
- 09/11 first technical round
- 09/26 got the result (rejected)
Round 1, Technical (1 hr)
The interviewer spoke Chinese and the whole thing was in Chinese.
Self-introduction, then a deep dive into my projects. The questions mostly revolved around the projects on my resume: why I designed it this way, whether doing it another way would be better, and what use case this design corresponds to.
They also dug further into the technologies used in the projects. Taking Elasticsearch as an example, I was asked:
- How did I design the index / mapping in the project? Why did I design it that way?
- How does the inverted index in ES work? I was not very familiar with this part and got a bit stuck answering.
Along the way they threw in some standard CS fundamentals questions.
Fundamentals
Networking basics: the differences between TCP and UDP and what each is used for.
Language features: the differences between C++ and Golang.
Coding: LeetCode 54, Spiral Matrix.
The interviewer said right at the start that the code does not need to compile, the point is that the logic is correct.
I first gave a DFS + visited array solution, but the interviewer added constraints: (1) no visited array, only O(1) extra space (the returned result array does not count), and (2) no modifying the original matrix in place, for example no overwriting visited cells with a special value as a visited marker.
So the only way was to use the boundaries / the offset of each layer to work out how many steps to take. I got stuck on the boundary checks when only a single row or a single column is left (off-by-one), and spent quite a lot of time on it. In the end I did finish the solution, but the process was not smooth.
Solution I worked out afterwards
Maintain four boundaries (top, bottom, left, right) and shrink the corresponding boundary after finishing each edge. Before walking the bottom edge and the left edge you have to check that the boundaries are still valid. That is exactly the key to handling a single row / single column and avoiding visiting cells twice.
Summary and advice
Practicing: do more problems from the company tag. I had actually done this problem before, but at the time I never thought about other solutions, so when the interviewer added constraints I got stuck. I suggest practicing every problem until you can solve it in several ways, especially the common follow-ups like "O(1) space" and "cannot modify the input", and pay special attention to edge cases like a single row / single column.
Resume: don't just be familiar with your own projects, you also need to truly understand the technologies and tools used in them. Like Elasticsearch mapping design and the inverted index principle: if it is on your resume, you should be able to explain it clearly.
Good luck to everyone with your interviews!
Discussion
Loading comments…