Meta·Software Engineer·Onsite - Coding / Algorithms
May 2026
Coding round at Meta for a Software Engineer role, two algorithmic problems back to back. Nothing behavioral, just straight into the problems. Tree stuff and matrix traversal, which is pretty standard Meta territory from what I've heard.
- Given an array of distinct integers representing the preorder traversal of a BST, reconstruct the original tree and return its root. A linear time solution is expected.
- Given an m x n integer matrix, return all elements visited in clockwise spiral order, peeling off the outer boundary layer by layer until the whole matrix is covered.
“I knew preorder means root comes first, so that part clicked fast.” The rest of the author's notes on Software Engineer interview at Meta, Onsite - Coding / Algorithms round, covers how they worked through the question, what the panel pushed back on, and what they would do differently.
View Post