[USA] Meta Onsite Non-AI Coding

meta logo
meta
SWE ProductUSANo Offer
November 8, 202526 reads

Summary

I interviewed for a SWE Product role at Meta in the USA, facing two coding problems: a binary tree column traversal and a complex problem involving friend request logic for centaurs. I couldn't fully solve the second problem but explained my approach.

Full Experience

I recently had an onsite coding interview at Meta for the SWE Product role in the USA. The interview session included two non-AI coding challenges. The first question was a standard binary tree column traversal problem, which I found quite straightforward. The second problem was more involved: designing friend request logic for mythical creatures called centaurs, based on several age-related rules. I struggled a bit with this one and wasn't able to code up a fully working solution covering all the rules within the given time. However, I made sure to clearly communicate my thought process and approach to the interviewer, detailing how I would tackle the problem. I later revisited the problem myself and realized it's manageable if framed correctly.

Interview Questions (2)

Q1
Binary Tree Column Traversal
Data Structures & AlgorithmsMedium

Given a binary tree (NOT BST), print the column traversal from leftmost column to rightmost column. If two nodes are in the "same column", the top most node in that column should appear before the bottom most node.

Q2
Centaurs Friend Request Logic
Data Structures & AlgorithmsHard

We are building facebook for mythical creatures called centaurs. Centaurs live much longer than humans and we want to understand the number of friend requests when we launch the app. Here's how centaur friendships work (you will be expected to gather some requirements though b/c the interviewer explained the problem in a confusing way):

  • Centaurs younger than 100 can friend other Centaurs younger than 100
  • Centaurs older than 100 can friend centaurs that are strictly older, but not younger than 100
  • Centaurs older than 100 can friend Centaurs older than x/2 + 7
At least one of the above rules must be satisfied for a centaur friend request to be valid.
Given a list of ages, return the number of friend requests. Friend requests for centaurs are directional (eg: just because I friend request you doesn't mean you automatically reciprocate the same)

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!