Meta Software Engineer Coding & Algorithms Interview Questions
Practice 218 real Coding & Algorithms interview questions for Software Engineer roles at Meta.

"I got asked a hardcore MCM DP question and I saw it on PracHub as well. Solved that question in 5 minutes. Without PracHub I doubt I could solve it in 5 hours. Though somehow didn't get hired, perhaps I guess I solved it too fast? /s"

"Believe me i'm a student here jn US. Recently interviewed for MSFT. They asked me exact question from PracHub. I saw it the night before and ignored it cause why waste time on random sites. I legit wanna go back and redo this whole thing if I had chance. Not saying will work for everyone but there is certainly some merit to that website. And i'm gonna use it in future prep from now on like lc tagged"

"10 years of experience but never worked at a top company. PracHub's senior-level questions helped me break into FAANG at 35. Age is just a number."

"I was skeptical about the 'real questions' claim, so I put it to the test. I searched for the exact question I got grilled on at my last Meta onsite... and it was right there. Word for word."

"Got a Google recruiter call on Monday, interview on Friday. Crammed PracHub for 4 days. Passed every round. This platform is a miracle worker."

"I've used LC, Glassdoor, and random Discords. Nothing comes close to the accuracy here. The questions are actually current — that's what got me. Felt like I had a cheat sheet during the interview."

"The solution quality is insane. It covers approach, edge cases, time complexity, follow-ups. Nothing else comes close."

"Legit the only resource you need. TC went from 180k -> 350k. Just memorize the top 50 for your target company and you're golden."

"PracHub Premium for one month cost me the price of two coffees a week. It landed me a $280K+ starting offer."

"Literally just signed a $600k offer. I only had 2 weeks to prep, so I focused entirely on the company-tagged lists here. If you're targeting L5+, don't overthink it."

"Coaches and bootcamp prep courses cost around $200-300 but PracHub Premium is actually less than a Netflix subscription. And it landed me a $178K offer."

"I honestly don't know how you guys gather so many real interview questions. It's almost scary. I walked into my Amazon loop and recognized 3 out of 4 problems from your database."

"Discovered PracHub 10 days before my interview. By day 5, I stopped being nervous. By interview day, I was actually excited to show what I knew."

"I recently cleared Uber interviews (strong hire in the design round) and all the questions were present in prachub."
"The search is what sold me. I typed in a really niche DP problem I got asked last year and it actually came up, full breakdown and everything. These guys are clearly updating it constantly."
Guide a mouse to find cheese with APIs
This question evaluates the ability to reason about graph exploration and stateful API interaction in an unknown 2D grid, assessing competencies in se...
Determine if subarray sums to target
You are given an array of non-negative integers and a non-negative integer target. Determine whether there exists a contiguous subarray (continuous se...
Find K-th Largest and Longest Vacation
Solve the following two coding problems. 1. Find the k-th largest element Given an integer array nums and an integer k, return the element that wou...
Design an in-memory database with TTL and history
Design and implement an in-memory key–field–value store with monotonic timestamps. Keys and fields are strings; values are integers. Provide these API...
Implement power and balance-parentheses algorithms
Design and implement two algorithms: 1) Fast exponentiation: Implement a function pow(x, n) that returns a real number x raised to an integer exponent...
Implement BST vertical traversal and list conversion
Given the root of a binary search tree (BST): 1) Implement vertical order traversal: assign the root column 0, left child column −1, right child colum...
Design an O(1) recency-evicting cache
Design and implement a fixed-capacity in-memory cache that supports get(key) and put(key, value) in average O( 1) time. When capacity is exceeded, evi...
Compute top-N active customers
Maintain and return the top N customers by cumulative activity amount, where activity is defined as the sum of deposit amounts, pay amounts, and trans...
Fill rooms with nearest gate distances
You are given an m×n integer grid representing rooms, where -1 is a wall, 0 is a gate, and INF (a large sentinel such as 2^31− 1) is an empty room. Fo...
Convert BST to sorted doubly list
Convert a binary search tree into a sorted doubly linked list in-place. Reuse the existing tree nodes: the left pointer becomes prev and the right poi...
Solve BST range average and merge intervals
1) Given a binary search tree and an inclusive range [L, R], compute both the sum and the average of all node values where L <= val <= R. Use the BST ...
Merge two interval lists into a union
You are given two lists of closed intervals [start, end]. Each list is individually sorted by start and contains non-overlapping intervals. Merge the ...
Compute nested depth-weighted sum
You are given a nested structure containing integers and lists (e.g., [1, [4, [6]]]). Define depth of the top-level as 1. Compute the total sum of all...
Design LCA and find K closest points
Part A — LCA with parent pointers: You are given two nodes a and b in a rooted tree where each node has a parent pointer (you may or may not have dire...
Compute left and right views once
Given the root of a binary search tree, output two lists: the nodes visible from the left side and the nodes visible from the right side, from top to ...
Reverse between equal-value nodes in list
Given the head of a singly linked list and a target value v, locate the first two nodes whose values equal v (call them A and B, with A before B) and ...
Count subarrays equal to target
Given an integer array nums and an integer k, return the number of contiguous subarrays whose sum equals k. Provide an algorithm better than O(n^ 2), ...
Navigate unknown grid to locate target
You control a mouse in an unknown 2D maze. You do not know the maze dimensions or your absolute coordinates. The interface exposes move() → bool (atte...
Find top-K frequent values with tiebreaks
Question Given an integer array nums and an integer k, return the k values with the highest frequency. The array can contain up to 10^6 elements. When...
Implement sparse vector dot product
Question Design a SparseVector class for vectors of integers in which most entries are zero, and support an efficient dot product between two such vec...