Meta Interview Questions (25+ Questions)
Last Updated: June 8, 2026 • 25 Questions • Real Company Interviews
Prepare for your Meta interview with our comprehensive collection of 25+ real interview questions and detailed answers. These questions have been curated from actual Meta technical interviews across various roles including DevOps Engineer, Data Engineer, QA Engineer, and more.
Table of Contents
- Application Config Setup (medium) 🔒
- Forward Traffic Between Ports (medium)
- Container Startup Diagnosis (medium) 🔒
- Surrounded Regions (medium)
- Calculate SLO Error Budget from Access Logs (medium) 🔒
- Filter and Sort Terraform List (easy) 🔒
- Self-Join to Identify Missing Supervisors (easy)
- Aggregate SQL Query Results with Pandas and Export to Excel (medium)
- Anonymize User PII (medium)
- Combine User Interactions (easy)
- Unengaged Pages (easy)
- Posting Activity Gap (easy)
- Well Paid Employees (easy)
- App Click-Through Rate Analysis (easy)
- Top Profitable Drugs (easy)
- User Activity Distribution (easy)
- Annual Revenue by Manufacturer (easy)
- Messaging Activity Analysis (medium)
- Monthly Active Users (medium)
- Advertiser Status Update (hard)
- Longest Consecutive Sequence (medium)
- Koko Eating Bananas (medium)
- Grouped Data Using HAVING Double Condition (medium) 🔒
- Video Streaming Platform API Testing (hard) 🔒
- Checkbox State Management Testing (easy) 🔒
Our Meta interview questions cover a wide range of technical topics and difficulty levels, from entry-level positions to senior roles. Each question includes detailed explanations and answers to help you understand the concepts and prepare effectively for your interview.
💡 Pro Tips for Meta Interviews
- Practice each question and understand the underlying concepts
- Review Meta's specific technologies and methodologies
- Prepare follow-up questions and edge cases
- Practice explaining your solutions clearly and concisely
Interview Questions & Answers
1. Application Config Setup
Learn how to create symbolic links to centralize file references across application directories using Linux Bash commands. This guide covers linking configuration files, verifying symlink resolution, and enabling transparent access to centralized resources, essential for configuration management, reducing duplication, and maintaining consistency in multi-service deployments.
2. Forward Traffic Between Ports
Master Linux port forwarding and traffic redirection using iptables NAT tables. Learn how to redirect traffic from one port to another (e.g., 8081 to 8080) without restarting services or modifying application code. This guide covers configuring PREROUTING and OUTPUT chains to handle both external and localhost traffic seamlessly. Essential for legacy application migration, zero-downtime updates, and flexible network traffic management.
3. Container Startup Diagnosis
Accelerate container startup from 30+ seconds to under 3 seconds by identifying and fixing initialization bottlenecks. Diagnose DNS resolution timeouts, /dev/random entropy blocking, missing device access, and network connection hangs using docker logs and docker exec. Optimize Dockerfile initialization, replace blocking operations with non-blocking alternatives, and verify exit times with the time command. Essential for fast deployments, improved user experience, CI/CD pipeline efficiency, and production reliability.
4. Surrounded Regions
def solve(board: list[list[str]]) -> list[list[str]]:
if not board or not board[0]:
return board
rows, cols = len(board), len(board[0])
def dfs(r, c):
if r < 0 or c < 0 or r >= rows or c >= cols or board[r][c] != "O":
return
board[r][c] = "T"
dfs(r + 1, c)
dfs(r - 1, c)
dfs(r, c + 1)
dfs(r, c - 1)
for r in range(rows):
dfs(r, 0)
dfs(r, cols - 1)
for c in range(cols):
dfs(0, c)
dfs(rows - 1, c)
for r in range(rows):
for c in range(cols):
if board[r][c] == "O":
board[r][c] = "X"
elif board[r][c] == "T":
board[r][c] = "O"
return board
5. Calculate SLO Error Budget from Access Logs
Parse application access logs to calculate the error rate and determine whether the service stayed within its defined SLO error budget.
6. Filter and Sort Terraform List
How to Create a Terraform Configuration for Filtering a Developer List on Team Collaboration Projects
When managing a team collaboration platform, it's essential to assign developers to projects efficiently. One common scenario involves generating a filtered list of developers based on certain ...
🔒 Premium Content
Detailed explanation and solution available for premium members.
7. Self-Join to Identify Missing Supervisors
How to Write a SQL Query to Identify Employees Without Supervisors in the Employee Database
Objective
In this detailed guide, we will discuss how to write a SQL query to identify employees whose supervisors are missing from the employees database table. The result should include the employee's ID, name, and their supervisor's ID, and the output must be sorted by the employee's ID in ascending order.
Additional Information
Before we jump into the query, let's review the structure of the employees table. The employees table contains the following columns:
employee_id(INT)name(VARCHAR)supervisor_id(INT)
Note: An employee with a supervisor_id of null indicates that they do not have a supervisor.
To find employees whose supervisors are not present in the database, follow these steps:
- Select the
employee_id,name, andsupervisor_idfrom theemployeestable. - Use a
LEFT JOINto ensure that each supervisor ID is checked against the existing employee IDs in the table. - Filter out the results where the supervisor record is
nullafter the join.
Here is the SQL query to achieve this:
SELECT e1.employee_id, e1.name, e1.supervisor_id
FROM employees e1
LEFT JOIN employees e2 ON e1.supervisor_id = e2.employee_id
WHERE e1.supervisor_id IS NOT NULL AND e2.employee_id IS NULL
ORDER BY e1.employee_id ASC;
Explanation of the Query:
- The query selects data from the
employeestable and uses an aliase1for clarity. - A
LEFT JOINis used to join theemployeestable to itself, with aliase2, on the condition thate1.supervisor_idmatchese2.employee_id. - The
WHEREclause is used to ensure that:- The
supervisor_idcolumn is notnull. - There is no matching
employee_idfor the supervisor in the joined table (indicative of a missing supervisor).
- The
- Finally, the output is ordered by
employee_idin ascending order.
By structuring your query this way, you can effectively identify and list all employees whose supervisors are not present in the database. This SQL query is efficient and makes it easy to maintain the organizational hierarchy by quickly identifying any gaps in supervision.
Conclusion
Understanding how to identify employees without supervisors using SQL is a valuable skill for database management and ensuring data consistency. The provided query demonstrates how to leverage LEFT JOIN and filtering techniques to accomplish this task efficiently. Ensure you follow best practices to maintain the integrity of your employee database.
8. Aggregate SQL Query Results with Pandas and Export to Excel
Execute SQL query to fetch data from SQLite database, load results into pandas DataFrame, calculate aggregate totals per customer, and export to Excel file.
9. Anonymize User PII
Extract email domains and anonymize phone numbers from user data.
10. Combine User Interactions
SELECT
user_id,
page_id,
visit_time AS interaction_time,
'visit' AS interaction_type
FROM {{ ref("page_visits") }}
UNION ALL
SELECT
user_id,
page_id,
like_time AS interaction_time,
'like' AS interaction_type
FROM {{ ref("page_likes") }}
UNION ALL
SELECT
user_id,
page_id,
comment_time AS interaction_time,
'comment' AS interaction_type
FROM {{ ref("page_comments") }}
11. Unengaged Pages
SELECT
p.page_id
FROM
pages p
LEFT JOIN page_likes pl ON p.page_id = pl.page_id
WHERE
pl.page_id IS NULL
ORDER BY
p.page_id ASC;
12. Posting Activity Gap
SELECT
user_id,
MAX(post_date::DATE) - MIN(post_date::DATE) AS days_between
FROM
posts
WHERE
EXTRACT(
YEAR
FROM
post_date
) = 2021
GROUP BY
user_id
HAVING
COUNT(post_id) >= 2
ORDER BY
user_id;
13. Well Paid Employees
SELECT
e.employee_id,
e.employee_name
FROM
employees e
JOIN employees m ON e.manager_id = m.employee_id
WHERE
e.salary > m.salary
ORDER BY
e.employee_id ASC;
14. App Click-Through Rate Analysis
SELECT
app_id,
ROUND(
100.0 * SUM(
CASE
WHEN event_type = 'click' THEN 1
ELSE 0
END
) / SUM(
CASE
WHEN event_type = 'impression' THEN 1
ELSE 0
END
),
2
) AS ctr
FROM
events
WHERE
EXTRACT(
YEAR
FROM
event_date
) = 2022
GROUP BY
app_id
ORDER BY
app_id ASC;
15. Top Profitable Drugs
SELECT
drug_name,
SUM(total_sales - cogs) AS total_profit
FROM
pharmacy_sales
GROUP BY
drug_name
ORDER BY
total_profit DESC
LIMIT
3;
16. User Activity Distribution
SELECT
post_bucket,
COUNT(user_id) AS users_num
FROM
(
SELECT
user_id,
COUNT(post_id) AS post_bucket
FROM
user_posts
WHERE
EXTRACT(
YEAR
FROM
post_date
) = 2024
GROUP BY
user_id
) AS user_post_counts
GROUP BY
post_bucket
ORDER BY
post_bucket ASC;
17. Annual Revenue by Manufacturer
SELECT
manufacturer,
CONCAT(
'$',
ROUND(SUM(total_sales) / 1000000),
' million'
) AS sale
FROM
pharmacy_sales
GROUP BY
manufacturer
ORDER BY
SUM(total_sales) DESC,
manufacturer ASC;
18. Messaging Activity Analysis
SELECT
age_bucket,
ROUND(
100.0 * SUM(
CASE
WHEN activity_type = 'send' THEN time_spent
ELSE 0
END
) / SUM(time_spent),
2
) AS send_perc,
ROUND(
100.0 * SUM(
CASE
WHEN activity_type = 'open' THEN time_spent
ELSE 0
END
) / SUM(time_spent),
2
) AS open_perc
FROM
activities a
INNER JOIN age_breakdown ab ON a.user_id = ab.user_id
GROUP BY
age_bucket
ORDER BY
age_bucket;
19. Monthly Active Users
WITH
jan_users AS (
SELECT DISTINCT
user_id
FROM
user_actions
WHERE
EXTRACT(
MONTH
FROM
event_date
) = 1
AND EXTRACT(
YEAR
FROM
event_date
) = 2026
),
feb_users AS (
SELECT DISTINCT
user_id
FROM
user_actions
WHERE
EXTRACT(
MONTH
FROM
event_date
) = 2
AND EXTRACT(
YEAR
FROM
event_date
) = 2026
)
SELECT
2 AS MONTH,
COUNT(*) AS monthly_active_users
FROM
feb_users f
JOIN jan_users j ON f.user_id = j.user_id;
20. Advertiser Status Update
SELECT
COALESCE(a.user_id, p.user_id) AS user_id,
CASE
WHEN p.user_id IS NULL THEN 'CHURN'
WHEN a.status IS NULL THEN 'NEW'
WHEN a.status = 'CHURN' THEN 'RESURRECT'
ELSE 'EXISTING'
END AS new_status
FROM
advertiser a
FULL OUTER JOIN daily_pay p ON a.user_id = p.user_id
ORDER BY
user_id;
21. Longest Consecutive Sequence
def longest_consecutive(nums: list[int]) -> int:
num_set = set(nums)
longest = 0
for n in num_set:
# Only check for the start of a sequence
if (n - 1) not in num_set:
length = 1
while (n + length) in num_set:
length += 1
longest = max(length, longest)
return longest
22. Koko Eating Bananas
def min_eating_speed(piles: list[int], h: int) -> int:
l, r = 1, max(piles)
res = r
while l <= r:
k = (l + r) // 2
hours = 0
for p in piles:
hours += (p + k - 1) // k
if hours <= h:
res = k
r = k - 1
else:
l = k + 1
return res
23. Grouped Data Using HAVING Double Condition
How to Retrieve Customers with At Least 3 Orders and Minimum Spending of 1000 Using SQL
When preparing for SQL or database-related interviews, you might encounter a question that asks you to retrieve the names of customers who have placed at least 3 orders and spent at least 1000 units in ...
🔒 Premium Content
Detailed explanation and solution available for premium members.
24. Video Streaming Platform API Testing
Netflix processes billions of streaming requests daily serving content to millions of users worldwide. QA testing of streaming platform APIs requires comprehensive validation of content upload, recommendation algorithms, user preference management, and analytics to ensure optimal viewing experiences...
🔒 Premium Content
Detailed explanation and solution available for premium members.
25. Checkbox State Management Testing
Master checkbox state management testing with Selenium. Learn state verification, dynamic selection, and comprehensive interaction validation....
🔒 Premium Content
Detailed explanation and solution available for premium members.
Ready to Practice More?
Explore interview questions from other companies or try our hands-on labs to build practical experience.