TikTok - ML Internship Interview Experience

TikTok - ML Internship Interview Experience

Background: I was rejected in Facebook (SWE), Palantir (SWE), and EY(Tech Consulting) even after answering all coding problems with optimized algorithms. Those rejections hit hard.

Rejection doesn't hurt. Not knowing the reason does.

I was really frustrated by it. Continued solving problems on LeetCode but started doubting on whether I will get the internship or not? Also, started working on backup plans if I don't get internship.

Online Assessment (2nd Nov, 2021)

Received Hackerrank coding challenge from TikTok as the first step of the internship hiring process. I searched through the LeetCode discussion section to see what type of problems TikTok asks in OA? All the reviews I read were pretty harsh. According to them, OA was going to be damn tough to crack. Just by looking at the reviews, I lost faith (because of reviews & previous rejections) that I can solve all problems. But anyway I needed to attempt so I started the test.

Problem 1 (LC Easy) was a string manipulation task. (Time taken: 3 minutes)
Problem 2 (LC Medium) was a modified binary search question. The problem was easy if you know bisect_left and bisect_right. (Time taken: 5 minutes)
Problem 3 (LC Hard) was a dynamic programming problem. It was a modified version of Gas Station problem on LeetCode. (Time taken: 10 minutes)
Problem 4 (>>>LC Hard) was a graph problem. Given a graph (which can be faulty), it was asked to find something (I forgot) but if a graph is faulty then we need to print an error. There were multiple errors. If graph has fault_1 (cycles), print E1. If graph has fault_2, print E2 etc. If the graph has multiple errors, print the one which is alphabetically smallest. (Time taken: 30 minutes)

It was hard to believe for me but I solved all 4 problems in 55 minutes. The total duration of the test was 60 minutes (1 hour). I was happy that my algorithm skills are improving but didn't expect that I will get an interview invitation.

Interview Invitation (28th Nov, 2021)

Just after Thanksgiving break, I received an email from the TikTok recruiter for scheduling the first interview. I sent my availability and the interview was scheduled.

I was still not excited because I thought I will answer correctly and still will be rejected (like other companies previously I interviewed for).

Interview 1 (14th Dec, 2021)

I was interviewed by a Research Scientist at ByteDance. He was graduated from Stanford. We both introduced ourselves to one another and he asked me about my interests. I answered about my projects in ML and AI. After that, he started the actual interview. (Time duration: 10 minutes)

He asked me graph problem. Given a graph, detect whether it is bipartite. For a moment, I was blank because I never solved any bipartite graph problem. Started breaking the problem into pieces and was able to solve it in the end. I executed the code and was working correctly for all 5 test cases. (Time duration: 30 minutes)

He asked me if I have any questions. I asked a couple of questions related to the company, and about the ML work at ByteDance. (Time duration: 5 minutes)

I received an email on 23rd Dec 2021 that they are ready to move forward with the second interview. This was like a Christmas gift for me.

Interview 2 (10th Jan, 2022)

This interview was taken by an employee working in the Applied ML team at TikTok. So I knew that if I get selected, I will work as part of the AML team. The interviewer was a Research Scientist. After the introduction, he asked me questions related to some of the ML projects that I did. These questions were more detailed and were about ML algorithms related. (Time taken: 15 minutes)

He asked the first question. Given a 2D image containing 0s and 1s. Find if the image contains a loop created by 1s which contains 0s. This was an easy DFS problem. My solution passed all test cases. Then he asked another graph problem. Given a multi-child tree (DAG where root can be defined), find a barycenter of the tree (a root such that the height of a tree is minimal). I struggled a lot with this problem. But I was able to formulate the DFS solution for it. It passed 4/5 test cases. Already 40 minutes of the interview was passed. I started finding the logical error in the solution. The interviewer gave me hint, but still was not working. After 45 minutes passed, an interviewer was still interested in my solution. Now, he started giving me hints as if he is my pair programmer. The interview went 10 minutes over the scheduled time. My solution was able to pass all test cases. (Time taken: 40 minutes)

I asked him some questions about the workflow of the AML team and about the work that the intern does. (Time taken: 5 minutes)

I was really sad and confused. At that moment, I felt like "Rejection incoming" (because I messed up in the second question). For 2 days after that interview, I felt the same. After that, I started analyzing the interview. I reached the conclusion with a question "Why interviewer went 15 minutes over the time of the interview and helped me solve the problem? Probably, he want me not to fail this interview".

On 19th Jan 2022, I received an email saying I have passed the second interview as well and they are moving forward with the third one. It was a ray of hope for me.

Interview 3 (3rd Feb, 2022)

This interview was with the recruiter and so I expected some behavioral problems. But, life is not that easy 😀. He asked me some behavioral questions, some questions related to my experience, etc. He also asked me a coding problem which was LC medium which I was able to solve.

At the end of the interview, he said that "Both of your previous interviewers have given amazing feedback about you and that is why I want to extend an internship offer to you. You were going to get an offer irrespective of the coding problem I asked right now." and he laughed.

And this is where my happiness exploded 🤩. We talked about some of the details about the position (working hours, stipend, location etc.) and concluded the call.

I hope this interview experience helps you in your preparation. Also, know that the interview process at TikTok doesn't just evaluate your coding skills. It is okay if you make some mistakes but the interviewer wants to see how much potential a candidate has. The communication skills matters as well.

Thank you.

I (Ashutosh Hathidara) am an artificial intelligence engineer, full-stack developer, and designer. I can be reached via:
Email:
Twitter: @ashutosh_1919
Github: @ashutosh1919
Discord: DevSense
LeetCode: @layman_brother

Did you find this article valuable?

Support Ashutosh Hathidara by becoming a sponsor. Any amount is appreciated!