Meta interview
Summary
I interviewed with Meta, navigating through a phone screen and two onsite coding rounds, including a custom BFS problem, and culminating in a system design discussion about an online chess game.
Full Experience
My interview journey with Meta began with a phone screen, where I was presented with LC 408 (Valid Word Abbreviation) and LC 791 (Custom Sort String). The onsite rounds followed. In Coding Round 1, I tackled LC 1650 (Lowest Common Ancestor of a Binary Tree III), where the interviewer specifically delved into the rationale behind the optimal space-efficient solution, and LC 1249 (Minimum Remove to Make Valid Parentheses). Coding Round 2 involved a variation of LC 8 (String to Integer (atoi)) and a challenging custom problem: '0-1-2 BFS on a Grid' to find the minimum cost path. I initially approached it with BFS and a heap, but the interviewer pressed for a solution without a heap, which I couldn't provide within the time limit. The final round was a System Design interview, where I was asked to design a 1v1 online chess game along with a leaderboard.
Interview Questions (7)
You are given an m × n grid. Each cell contains an integer value from {0, 1, 2} representing the cost to enter that cell. You can move up, down, left, or right. Your task is to find the minimum cost required to move from the top-left cell (0, 0) to the bottom-right cell (m-1, n-1). [this is not min of total sum of path]
Example 1:
grid = [
[0, 0, 2],
[0, 1, 1],
[1, 2, 1]
]
Output: 1
Example 2:
grid = [
[0, 0, 2],
[0, 2, 2],
[2, 2, 0]
]
Output: 2
Design an online 1 vs 1 chess game along with a leaderboard system.