Meta Software Engineer Coding & Algorithms Interview Questions

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

218 Questions 1 Company07.06.2026
Showing 20 results
Role
Meta logo
Meta
Medium
Software Engineer

Implement string and basic ML algorithms

You are given three implementation tasks that mix algorithms and basic machine learning models. --- Task 1: Longest substring with all distinct charac...

Coding & Algorithms
5
0
65 people solved
Dec 8, 2025
Meta logo
Meta
Easy
Software Engineer

Implement list cloning and k-frequency finder

You are given two separate coding tasks. --- Problem 1: Deep copy a linked list with extra pointers You are given the head of a singly linked list. Ea...

Coding & Algorithms
3
0
72 people solved
Nov 27, 2025
Meta logo
Meta
Easy
Software Engineer

Design a time-versioned key-value store and find common free time

You are given two coding tasks. Task 1: Time-versioned key-value store Design an in-memory data structure that supports: - set(key, value, timestamp):...

Coding & Algorithms
4
0
32 people solved
Nov 12, 2025
Meta logo
Meta
Medium
Software Engineer

Find shortest subarray with range ≥ k

Problem You are given an integer array nums of length n and an integer k. Define the range of a subarray as: \[ \max(\text{subarray}) - \min(\text{sub...

Coding & Algorithms
3
0
34 people solved
Oct 23, 2025
Meta logo
Meta
Hard
Software Engineer

Solve common array/string/linked-list tasks

You may be asked one or more of the following independent coding tasks. For each task, implement an efficient algorithm and clearly state time/space c...

Coding & Algorithms
5
0
46 people solved
Oct 21, 2025
Meta logo
Meta
Medium
Software Engineer

Design structure for top-K frequent elements

You are working with a large collection of items represented by integer IDs (e.g., product IDs, user IDs, etc.). Updates and queries arrive over time....

Coding & Algorithms
3
0
51 people solved
Oct 21, 2025
Meta logo
Meta
Medium
Software Engineer

Find shortest substring with N unique characters

You are given a string s and an integer n. Find the shortest contiguous substring of s that contains exactly n distinct characters. If there is no suc...

Coding & Algorithms
3
0
40 people solved
Oct 21, 2025
Meta logo
Meta
Medium
Software Engineer

Find shortest path and compare BFS vs DFS

Given an unweighted graph (directed or undirected), explain how to find the shortest path between two nodes without writing code. Describe the algorit...

Coding & Algorithms
5
0
50 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Compute max profit from single stock trade

Given an array prices where prices[i] is the stock price on day i, compute the maximum profit achievable with at most one transaction (one buy and one...

Coding & Algorithms
1
0
23 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Implement string dedup and mirror tree traversal

- String cleanup with group deletions (LeetCode-inspired): Given a string s consisting of lowercase letters, repeatedly delete any maximal contiguous ...

Coding & Algorithms
1
0
27 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Compute longest rising path in a grid

Given an m×n grid of integers, find the length of the longest path where each step moves up, down, left, or right to a strictly larger value. Return t...

Coding & Algorithms
3
0
43 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Optimize flight costs and find grid path

1) Given two integer arrays D and R of equal length n, where D[i] is the cost to depart on day i and R[j] is the cost to return on day j, choose indic...

Coding & Algorithms
4
0
31 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Navigate unknown maze to find target

You are given an exploration interface for an unknown 2D maze that exposes only local actions (e.g., move(up/down/left/right) -> bool indicating succe...

Coding & Algorithms
2
0
34 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Solve parsing, counting, ranges, and window problems

Solve the following four algorithm problems: 1) Expression evaluator with + and : Given a string s containing non-negative integers, '+' and '' operat...

Coding & Algorithms
2
0
27 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Reverse sublist between equal-value nodes

Given the head of a singly linked list and a target value v that appears at least twice, reverse the sublist starting at the first node with value v a...

Coding & Algorithms
4
0
39 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Count subarrays summing to target

Given an integer array nums and an integer target T, return the number of contiguous subarrays whose sum equals T. Provide an algorithm that runs in l...

Coding & Algorithms
3
0
33 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Solve sliding window and tree BFS problems

1) Sliding window: Given an array of positive integers nums and an integer target, return the minimal length of a contiguous subarray whose sum is at ...

Coding & Algorithms
2
0
30 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Solve grid path and robot navigation

Part A — Shortest path in a grid with obstacles: Given an m×n grid of 0/1 cells (0 = open, 1 = obstacle), start at (0, 0) and end at (m−1,n− 1). You m...

Coding & Algorithms
4
0
34 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Implement basic expression evaluator

Implement a function to evaluate a string expression containing non-negative integers, '+', '-', '*', '/', and spaces. Multiplication and division hav...

Coding & Algorithms
4
0
30 people solved
Aug 14, 2025
Meta logo
Meta
Medium
Software Engineer

Solve tree traversal and interval merging tasks

Part A — Column-wise Binary Tree Grouping: You are given the root of a binary tree. Group nodes by vertical column index, where the root has column 0,...

Coding & Algorithms
4
0
37 people solved
Aug 13, 2025

Explore more Meta Software Engineer interview questions

Real questions from candidate reports, grouped by topic.

Other Meta Software Engineer categories
Browse all