Meta | Software Engineer, Infrastructure | Coding (Mock) | USA | Sept 2024 | No Result (Mock)

Anonymous User
7
Sep 28, 2024

Status: 10+ YoE, BS CS top 20 US CS program
Position: Not employed (1 contract offer in hand, undecided on accepting)
Location: USA
Date: Sept 2024

Meta offers a mock coding interview. Like their current full process, it is virtual (Zoom, CoderPad).

This is identical to their coding interview (screening, 1st round), except that they provide feedback in the end.

Problem 1 was LC200 Number of Islands (medium). I solved it. While he was describing the problem I felt conflicted about whether to begin or wait for him to finish talking. (I think at one point in the interview I did interrupt him and it seemed to jar him, so I didn’t do it again.)

He asked me what the complexity in time was. I responded that it was linear wrt number of cells. He later asked me why I thought it was quadratic, but I was unsure whether he was telling me that it was quadratic. Cost a few minutes getting that cleared up.

He told me he thought my code had an error. I found it and fixed.

Also, I noted that my solution would change the input array, and he asked if we could do this without modifying the array. (I change the 1 to -1 to effectively retain the input in a modified form, rather than changing to 0, when I do these.) I said the best I could think of would be to copy the input first. I suppose another way to do it would be to store an island as a Set of Coordinates, but this also requires additional memory.

Problem 2 was pretty much LC283 Move Zeroes, which is set as easy in LC and I would say is similar to the problem I got. Was worded a bit differently and had slightly different requirements.

I fudged this one up a bit; again, I was thinking ahead, especially since I felt behind, to start thinking about the problem before he finished describing it.

The way the problem was described to me was that you want to take an input array, and in-place, bring the non-zeros to the front, and then you don’t care what is in the place of the last elements after all the non-zeros. (Can be non-zero or just whatever garbage elements.)

I immediately thought to zoom through the array and put the indices of the 0’s in an ArrayList; good thing he interrupted my flow and then suggested that I don’t use another list, as doing it without using additional memory would be better. I saw that this would be doable, so I commented out that approach, and I think to be honest, I was a bit mentally attached to how I had planned to initially do the problem, so I didn’t “see it with fresh eyes”…I wrote a while loop with another while loop inside of it (the clearer solution would be one while loop after the other), and then I noted this aloud to him, that my solution was clunky, and he agreed.

I asked about time (we were 40 mins in) and he said it was better to take time for him to give me feedback rather than to finish the problem.

He asked if I had any Q’s for him, then I said I’d like his feedback first.

He told me:

  • liked that i explained my thoughts before starting
  • liked that I started going into testing
  • I should have tested the actual code rather than testing the algorithm (I ran the code line by line but noted what I INTENDED the code to be doing, rather than the actual characters I had typed)
  • reminded me that time is very important, and since we had 45 minutes for 2 problems, that you really have 12 minutes to code up an algorithm on your first shot, ideally not needing any major re-writes… This would allow follow up convo about stuff like complexity, not just coding.

Coming into this interview, I had been assuming my odds of a successful interview with Meta (full round) would be 50%. After this…I think I may still be around 50%, but that I need to spend my time up to the first/screening interview more wisely.

Biggest takeaways, as this is 1 week out from when I’m doing my writeup, I need to:

  • sleep very very well
  • keep stress low - 2 days prior I got an “exploding offer” with a 24 hour deadline that kept me sleeping on 3 hours (less preferred company to Meta, requiring relocation, hence being stressful). I told them I would give them an answer but take a few more days, then slept well since
  • I probably want to meditate 2x per day until then. Used to meditate, and I think I get stressed out when the interviewer is speaking slowly and start rushing ahead. Re-starting some meditation practice will help me be more at peace in the interview.
  • Of course, I’ll also do more practice from the perspective of my takeaways having done this mock interview.

Highly recommend a mock if you interview with Meta, great offering they give. Appreciate that they offer this because even as a mock I was a bit nervous. I suspect my questions were on the easier end but I'm not going to complain if I get these types in the real interviews.

Comments (0)