[USA] Meta AI Coding Round
Summary
I interviewed for a SWE Product role at Meta, participating in an AI coding round. This unique experience involved debugging existing utility functions and implementing a solution for an NP-Complete problem involving word subsets, which I solved but struggled to optimize.
Full Experience
My onsite interview process at Meta for a SWE Product role included an AI coding round, a non-AI coding round, a system design interview, and a behavioral interview. For the AI coding round, I was presented with a coderpad equipped with 'AI Assist' mode, offering lightweight foundation models. I chose Claude Haiku 3.5 and was given a codebase consisting of main.py, test.py, solve.py, utils.py, and a data/ directory.
My first task was to fix two failing unit tests in utils.py, which involved minor logic errors and debugging with print statements. The second task was to implement solve.py, a stubbed function designed to take a list of words and identify a subset meeting a specific property. I leveraged AI Assist to craft a good prompt, which helped me generate working code that passed the provided unit tests. However, my solution for this part was exponential time. When asked to optimize, I struggled to find a more efficient approach, later discovering from the interviewer that it was an NP-Complete problem. This was quite an unforgettable experience, highlighting the practicality of such rounds despite the challenging time complexity question.
Interview Questions (2)
I was given a utils.py file with utility functions, where 2 out of 4 unit tests were failing. The task was to fix these minor logic errors. The coderpad provided 'run code' and 'run tests' buttons for debugging, so no manual tracing was required.
The problem involved implementing a stubbed function in solve.py. This function needed to take a list of words and identify a subset of these words that met a certain, unspecified property. This was later revealed to be an NP-Complete problem.
Preparation Tips
To prepare for the AI coding round, I learned to set aside traditional LeetCode grinding, as it wouldn't be as helpful. Instead, I focused on understanding how to effectively use AI Assist with lightweight foundation models like Claude Haiku, practicing careful prompt crafting. A significant part of my preparation involved working with medium-sized codebases across several files (e.g., main.py, test.py, utility modules), similar to the sample codebase Meta provides. The key was to demonstrate responsible AI usage rather than relying on it as a crutch.