Meta Coding Interview Questions: 223 Tagged Problems
223 coding problems tagged Meta — 40 easy · 134 medium · 49 hard — with solutions in 13 languages. Plus a 4-week study plan by topic.
- Problems: 223
- By difficulty: 40 easy · 134 medium · 49 hard
- Languages: JavaScript, TypeScript, Python, Java, C++, C, C#, Go, Kotlin, Swift, Rust, PHP and Ruby
- Cost: Free on every plan; sign in to run and submit
223 problems the CodeKairo catalogue tags as commonly asked in Meta's coding rounds — 40 easy, 134 medium and 49 hard — each judged by hidden tests in 13 languages. The most common topics among them are Arrays (108), Strings (61) and Depth-First Search (50). CodeKairo's Meta — Coding Screen mock covers the Meta coding screen pattern, which has the tightest clock in this catalogue: four problems in seventy minutes. The tag is the catalogue's own annotation of where a problem tends to come up — not a list published by Meta, which CodeKairo is not affiliated with.
Meta study plan by topic
40 of the 223 problems tagged Meta over 4 weeks, about 21 h 20 min of solving, grouped by technique in the order they build on each other — Arrays, Hash Table, Counting and Math and 24 more. It ends with the Meta — Coding Screen mock.
Week 1: Arrays, Hash Table, Counting +6
12 problems on Arrays, Hash Table, Counting, Math, Two Pointers, Sliding Window, Prefix Sum, Sorting and Binary Search, easiest first within each topic.
- Monotonic Array Easy
- Jewels and Stones Easy
- Count Unique Characters of All Substrings of a Given String Hard
- Excel Sheet Column Number Easy
- Intersection of Two Arrays Easy
- Intersection of Two Arrays II Easy
- Next Permutation Medium
- Subarray Product Less Than K Medium
- Find Pivot Index Easy
- Contiguous Array Medium
- Custom Sort String Medium
- Find First and Last Position of Element in Sorted Array Medium
Week 2: Stack, Queue, Monotonic Stack +6
11 problems on Stack, Queue, Monotonic Stack, Matrix, Simulation, Greedy, Recursion, Divide and Conquer and Heap, easiest first within each topic.
- Valid Parenthesis String Medium
- Longest Valid Parentheses Hard
- Maximum Sum Circular Subarray Medium
- Buildings With an Ocean View Medium
- Maximal Square Medium
- Game of Life Medium
- Distribute Candies Easy
- Increasing Triplet Subsequence Medium
- Integer to English Words Hard
- Longest Substring With At Least K Repeating Characters Medium
- Kth Smallest Element in a Sorted Matrix Medium
Week 3: Bit Manipulation, Bitmask, Combinatorics +3
12 problems on Bit Manipulation, Bitmask, Combinatorics, Trees, Trie and Backtracking, easiest first within each topic.
- Counting Bits Easy
- Hamming Distance Easy
- Maximum AND Sum of Array Hard
- Number of Ways to Reorder Array to Get Same BST Hard
- Minimum Depth of Binary Tree Easy
- Path Sum Easy
- Diameter of Binary Tree Easy
- Binary Tree Tilt Easy
- Two Sum IV - Input is a BST Easy
- Short Encoding of Words Medium
- Word Search Medium
- All Paths From Source to Target Medium
Week 4: Breadth-First Search, Union Find, Dynamic Programming +1
5 problems on Breadth-First Search, Union Find, Dynamic Programming and Geometry, easiest first within each topic.
- Pacific Atlantic Water Flow Medium
- Word Ladder Hard
- Number of Connected Components in an Undirected Graph Medium
- Best Time to Buy and Sell Stock III Hard
- Check If It Is a Straight Line Easy
Finally: the timed test
Sit the Meta — Coding Screen mock under the clock — the coding problems are only one part of the round.
Meta test patterns
- Meta — Coding Screen pattern guide and timed mock
The Meta interview process, round by round
All problems tagged Meta
Easy (40)
- Range Sum Query - Immutable Array, Prefix Sum, Design
- Palindrome Linked List Linked List, Two Pointers, Stack
- Convert Sorted Array to Binary Search Tree Array, Divide and Conquer, Tree
- Cousins in Binary Tree Tree, Depth-First Search, Breadth-First Search
- Range Sum of BST Tree, Depth-First Search, Binary Search
- Two Sum IV - Input is a BST Tree, Depth-First Search, Hash Table
- Subtree of Another Tree Tree, Depth-First Search, String Matching
- Binary Tree Tilt Tree, Depth-First Search
- Diameter of Binary Tree Tree, Depth-First Search
- Binary Tree Paths Tree, Depth-First Search, Backtracking
- Path Sum Tree, Depth-First Search, Breadth-First Search
- Minimum Depth of Binary Tree Tree, Depth-First Search, Breadth-First Search
- Check if One String Swap Can Make Strings Equal Hash Table, String, Counting
- Make Two Arrays Equal by Reversing Subarrays Array, Hash Table, Sorting
- Element Appearing More Than 25% In Sorted Array Array, Binary Search
- Shortest Word Distance Array, String, Two Pointers
- Valid Word Abbreviation String, Two Pointers
- Check If It Is a Straight Line Array, Math, Geometry
- Verifying an Alien Dictionary Array, String, Hash Table
- Check If All 1's Are at Least Length K Places Away Array
- Monotonic Array Array
- Hamming Distance Bit Manipulation
- Counting Bits Dynamic Programming, Bit Manipulation
- Maximum Product of Three Numbers Array, Math, Sorting
- Sort Array By Parity II Array, Two Pointers, Sorting
- Toeplitz Matrix Array, Matrix
- Shortest Distance to a Character Array, Two Pointers, String
- Jewels and Stones Hash Table, String
- Reverse Words in a String III Two Pointers, String
- Sort Array By Parity Array, Two Pointers, Sorting
- Distribute Candies Array, Hash Table, Greedy
- Find Pivot Index Array, Prefix Sum
- Intersection of Two Arrays II Array, Hash Table, Two Pointers
- Intersection of Two Arrays Array, Hash Table, Two Pointers
- Add Strings Math, String, Simulation
- Plus One Array, Math
- Add Binary Math, String, Bit Manipulation
- Roman to Integer Hash Table, Math, String
- Excel Sheet Column Title Math, String
- Excel Sheet Column Number Math, String
Medium (134)
- Time Based Key-Value Store Hash Table, String, Binary Search
- Design Circular Queue Array, Queue, Design
- Design Twitter Hash Table, Heap (Priority Queue), Design
- Range Sum Query - Mutable Array, Binary Indexed Tree, Segment Tree
- Range Sum Query 2D - Immutable Array, Matrix, Prefix Sum
- Design Add and Search Words Data Structure String, Depth-First Search, Trie
- LRU Cache Hash Table, Design
- Sort List Linked List, Sorting, Merge Sort
- Reorder List Linked List, Two Pointers, Stack
- Convert Sorted List to Binary Search Tree Linked List, Tree, Divide and Conquer
- Reverse Linked List II Linked List, Two Pointers
- Remove Duplicates from Sorted List II Linked List, Two Pointers
- Swap Nodes in Pairs Linked List, Recursion
- Remove Nth Node From End of List Linked List, Two Pointers
- Count Nodes Equal to Average of Subtree Tree, Depth-First Search
- Step-By-Step Directions From a Binary Tree Node to Another Tree, Depth-First Search, String
- Count Good Nodes in Binary Tree Tree, Depth-First Search, Breadth-First Search
- Longest ZigZag Path in a Binary Tree Tree, Depth-First Search, Dynamic Programming
- All Elements in Two Binary Search Trees Tree, Depth-First Search, Sorting
- Maximum Difference Between Node and Ancestor Tree, Depth-First Search
- Construct Binary Search Tree from Preorder Traversal Array, Stack, Tree
- Check Completeness of a Binary Tree Tree, Breadth-First Search
- Smallest Subtree with all the Deepest Nodes Hash Table, Tree, Depth-First Search
- All Nodes Distance K in Binary Tree Hash Table, Tree, Depth-First Search
- Maximum Width of Binary Tree Tree, Depth-First Search, Breadth-First Search
- Convert BST to Greater Tree Tree, Depth-First Search, Binary Search
- Find Largest Value in Each Tree Row Tree, Depth-First Search, Breadth-First Search
- Path Sum III Tree, Depth-First Search, Prefix Sum
- Lowest Common Ancestor of a Binary Tree Tree, Depth-First Search
- Lowest Common Ancestor of a Binary Search Tree Tree, Binary Search, Depth-First Search
- Kth Smallest Element in a BST Tree, Depth-First Search
- Binary Tree Right Side View Tree, Breadth-First Search, Depth-First Search
- Sum Root to Leaf Numbers Tree, Depth-First Search
- Flatten Binary Tree to Linked List Tree, Depth-First Search, Stack
- Path Sum II Tree, Depth-First Search, Backtracking
- Binary Tree Zigzag Level Order Traversal Tree, Breadth-First Search
- Binary Tree Level Order Traversal Tree, Breadth-First Search
- Validate Binary Search Tree Tree, Depth-First Search
- Construct String from Binary Tree Tree, Depth-First Search, String
- Remove Sub-Folders from the Filesystem Array, String, Depth-First Search
- Validate Binary Tree Nodes Tree, Depth-First Search, Breadth-First Search
- Letter Case Permutation String, Backtracking, Bit Manipulation
- Matchsticks to Square Array, Backtracking, Bitmask
- Combination Sum II Array, Backtracking
- Permutations II Array, Backtracking, Sorting
- Subsets II Array, Backtracking, Bit Manipulation
- Valid Tic-Tac-Toe State Array, Matrix, Simulation
- Minesweeper Array, Breadth-First Search, Depth-First Search
- Battleships in a Board Array, Depth-First Search, Matrix
- Diagonal Traverse II Array, Sorting, Matrix
- Nearest Exit from Entrance in Maze Array, Matrix, Breadth-First Search
- Check if a Parentheses String Can Be Valid String, Stack, Greedy
- Exclusive Time of Functions Array, Stack
- Shortest Subarray to be Removed to Make Array Sorted Array, Two Pointers, Binary Search
- Mirror Reflection Math, Geometry, Number Theory
- Fraction to Recurring Decimal Hash Table, Math, String
- Plates Between Candles Array, String, Binary Search
- Break a Palindrome String, Greedy
- Groups of Special-Equivalent Strings Array, Hash Table, String
- Previous Permutation With One Swap Array, Greedy
- Friends Of Appropriate Ages Array, Counting, Sorting
- Minimum Number of Increments on Subarrays to Form a Target Array Array, Greedy, Dynamic Programming
- The Maze II Array, Matrix, Graph
- Number of Corner Rectangles Array, Matrix, Math
- Peak Index in a Mountain Array Array, Binary Search
- Find First and Last Position of Element in Sorted Array Array, Binary Search
- Max Consecutive Ones II Array, Sliding Window, Dynamic Programming
- Sentence Similarity III String, Two Pointers, Array
- Number of Wonderful Substrings Bit Manipulation, Hash Table, String
- Bitwise ORs of Subarrays Bit Manipulation, Array, Dynamic Programming
- Find the Longest Substring Containing Vowels in Even Counts Bit Manipulation, Hash Table, String
- UTF-8 Validation Bit Manipulation, Array
- Flip String to Monotone Increasing String, Dynamic Programming, Bit Manipulation
- Maximum XOR After Operations Bit Manipulation, Array, Brainteaser
- Integer Replacement Bit Manipulation, Greedy, Dynamic Programming
- Minimum Area Rectangle Hash Table, Array, Geometry
- Number of Boomerangs Hash Table, Math, Array
- Brick Wall Hash Table, Array, Counting
- Maximum Size Subarray Sum Equals k Array, Hash Table, Prefix Sum
- Short Encoding of Words String, Trie, Hash Table
- Longest Substring With At Least K Repeating Characters String, Sliding Window, Divide and Conquer
- Number of Matching Subsequences String, Two Pointers, Binary Search
- Paint House Array, Dynamic Programming
- Non-decreasing Array Array, Greedy
- Word Search Array, String, Backtracking
- Pacific Atlantic Water Flow Array, Depth-First Search, Breadth-First Search
- Jump Game III Array, Depth-First Search, Breadth-First Search
- Possible Bipartition Depth-First Search, Breadth-First Search, Union Find
- Minimum Height Trees Depth-First Search, Breadth-First Search, Graph
- Number of Distinct Islands Array, Hash Table, Depth-First Search
- Shortest Bridge Array, Depth-First Search, Breadth-First Search
- The Earliest Moment When Everyone Become Friends Array, Union Find, Sorting
- Shortest Path in Binary Matrix Array, Breadth-First Search, Matrix
- All Paths From Source to Target Backtracking, Depth-First Search, Breadth-First Search
- Is Graph Bipartite? Depth-First Search, Breadth-First Search, Union Find
- Graph Valid Tree Depth-First Search, Breadth-First Search, Union Find
- Number of Connected Components in an Undirected Graph Depth-First Search, Breadth-First Search, Union Find
- Divide Two Integers Math, Bit Manipulation
- Maximum Product of Word Lengths Array, String, Bit Manipulation
- Total Hamming Distance Array, Math, Bit Manipulation
- Single Number III Array, Bit Manipulation
- Buildings With an Ocean View Array, Stack, Monotonic Stack
- Basic Calculator II Math, String, Stack
- Score of Parentheses String, Stack
- Minimum Remove to Make Valid Parentheses String, Stack
- Minimum Add to Make Parentheses Valid String, Stack, Greedy
- Find K Closest Elements Array, Two Pointers, Binary Search
- Kth Smallest Element in a Sorted Matrix Array, Binary Search, Sorting
- K Closest Points to Origin Array, Math, Divide and Conquer
- Maximum Swap Math, Greedy
- Valid Triangle Number Array, Two Pointers, Binary Search
- Largest Number Array, String, Greedy
- Maximum Sum Circular Subarray Array, Divide and Conquer, Dynamic Programming
- Combination Sum IV Array, Dynamic Programming
- Perfect Squares Math, Dynamic Programming, Breadth-First Search
- Interleaving String String, Dynamic Programming
- Arithmetic Slices Array, Dynamic Programming
- Number of Longest Increasing Subsequence Array, Dynamic Programming, Binary Indexed Tree
- Maximum Length of Repeated Subarray Array, Binary Search, Dynamic Programming
- Valid Sudoku Array, Hash Table, Matrix
- Game of Life Array, Matrix, Simulation
- Maximal Square Array, Dynamic Programming, Matrix
- Diagonal Traverse Array, Matrix, Simulation
- Remove Duplicates from Sorted Array II Array, Two Pointers
- Continuous Subarray Sum Array, Hash Table, Math
- Contiguous Array Array, Hash Table, Prefix Sum
- Subarray Product Less Than K Array, Sliding Window, Binary Search
- Custom Sort String Hash Table, String, Sorting
- Valid Parenthesis String String, Dynamic Programming, Stack
- Count and Say String, Simulation
- Reverse Words in a String Two Pointers, String
- Increasing Triplet Subsequence Array, Greedy
- H-Index Array, Sorting, Counting Sort
- Next Permutation Array, Two Pointers
Hard (49)
- Prefix and Suffix Search Array, Hash Table, String
- LFU Cache Hash Table, Linked List, Design
- Reverse Nodes in k-Group Linked List, Recursion
- Merge k Sorted Lists Linked List, Divide and Conquer, Heap (Priority Queue)
- Vertical Order Traversal of a Binary Tree Tree, Depth-First Search, Breadth-First Search
- Binary Tree Maximum Path Sum Tree, Depth-First Search, Dynamic Programming
- Stickers to Spell Word String, Dynamic Programming, Backtracking
- Expression Add Operators Math, String, Backtracking
- Shortest Path in a Grid with Obstacles Elimination Array, Breadth-First Search, Matrix
- Maximum Sum of 3 Non-Overlapping Subarrays Array, Dynamic Programming, Prefix Sum
- Decode Ways II String, Dynamic Programming
- Minimum Swaps To Make Sequences Increasing Array, Dynamic Programming
- Basic Calculator Math, String, Stack
- Robot Collisions Array, Stack, Sorting
- Number of Flowers in Full Bloom Array, Binary Search, Sorting
- Word Break II Hash Table, String, Dynamic Programming
- Concatenated Words String, Dynamic Programming, Depth-First Search
- Remove Invalid Parentheses String, Backtracking, Breadth-First Search
- Integer to English Words String, Math, Recursion
- Valid Number String, Simulation
- Count the Number of Ideal Arrays Math, Dynamic Programming, Combinatorics
- Number of Ways to Rearrange Sticks With K Sticks Visible Math, Dynamic Programming, Combinatorics
- The Number of Good Subsets Array, Math, Dynamic Programming
- Number of Ways to Reorder Array to Get Same BST Array, Math, Divide and Conquer
- Make Array Strictly Increasing Array, Binary Search, Dynamic Programming
- Odd Even Jump Array, Dynamic Programming, Stack
- Minimum Replacements to Sort the Array Array, Math, Greedy
- Reverse Pairs Array, Binary Search, Divide and Conquer
- Number of Ways to Separate Numbers String, Dynamic Programming, Suffix Array
- Stone Game VIII Array, Math, Dynamic Programming
- Constrained Subsequence Sum Array, Dynamic Programming, Queue
- Strange Printer String, Dynamic Programming
- Special Binary String String, Recursion, Divide and Conquer
- Shortest Distance from All Buildings Array, Matrix, Breadth-First Search
- Number of Submatrices That Sum to Target Array, Matrix, Hash Table
- Shortest Path Visiting All Nodes Bit Manipulation, Breadth-First Search, Graph
- Maximum AND Sum of Array Bit Manipulation, Dynamic Programming, Bitmask
- Find Subarray With Bitwise OR Closest to K Bit Manipulation, Array, Binary Search
- Preimage Size of Factorial Zeroes Function Math, Binary Search, Number Theory
- Largest Multiple of Three Array, Greedy, Dynamic Programming
- Count of Range Sum Fenwick Tree, Divide and Conquer, Prefix Sum
- Substring with Concatenation of All Words Hash Table, String, Sliding Window
- Count Unique Characters of All Substrings of a Given String String, Hash Table, Counting
- Max Value of Equation Array, Monotonic Queue, Sliding Window
- Wildcard Matching String, Dynamic Programming, Greedy
- Swim in Rising Water Array, Binary Search, Depth-First Search
- Word Ladder Hash Table, String, Breadth-First Search
- Longest Valid Parentheses String, Dynamic Programming, Stack
- Best Time to Buy and Sell Stock III Array, Dynamic Programming
Topics Meta asks most
- Arrays 108 problems
- Strings 61 problems
- Depth-First Search 50 problems
- Dynamic Programming 41 problems
- Trees 39 problems
- Hash Table 37 problems
- Breadth-First Search 35 problems
- Math 30 problems
- Sorting 24 problems
- Two Pointers 23 problems
- Matrix 23 problems
- Binary Search 22 problems