Prepare for Facebook (Meta) Software Engineer interviews with a comprehensive collection of coding, system design, and core computer science questions. This interview sheet is designed to help you practice the most frequently asked Meta interview problems and improve your problem-solving skills.
- Covers Meta's most frequently asked DSA, coding, and system design interview questions.
- Strengthen your interview preparation with company-specific problems and proven coding patterns.
Topic-Wise DSA Questions
Arrays
An Array is a collection of items stored at contiguous memory locations. The idea is to store multiple items of the same type together.
- Move all zeroes to the end of the array
- Subarray with given sum
- Top K Frequent in an Array
- Largest Sum Contiguous Subarray
- Matrix Rotation
- Trapping Rain Water
- Next Permutation
- Product of Array Except Itself
- Search a Word in a 2D Grid of Characters
- Program for Conway’s Game of Life
- Pascal’s Triangle
- Number of square matrices with all 1s
- Minimum time required to produce M items
- Count of submatrices with sum X in a given matrix
- Third largest element in an array of distinct elements
- Count Smaller Elements
- Minimum number of jumps to reach the end
- Largest Fibonacci Subsequence
- Majority Element
Strings
Strings are defined as an array of characters. The difference between a character array and a string is the string is terminated with a special character ‘\0’.
- Program to convert a given number to words
- Smallest window in a String containing all characters of other String
- Print all combinations of balanced parentheses
- Given a sequence of words, print all anagrams
- Sum of two large numbers
- Roman to Integer Conversion
- Given a string, find its first non-repeating character
- Program to validate an IP address
- Look-and-Say Sequence
- Generate all binary strings from given pattern
- Multiply large numbers represented as strings
- Repetition of a substring n times
- Length of the smallest substring consisting of maximum distinct characters
- Put spaces between words starting with capital letters love
Linked List
Linked List is the data structure that can overcome all the limitations of an array. A Linked list is a linear data structure, in which the elements are not stored at contiguous memory locations, it allocates memory dynamically.
- Reverse a linked list
- Merge k sorted linked lists
- Add two numbers represented by linked lists
- Clone a linked list with next and random
- Function to check if a singly linked list is a palindrome
- Reverse a Linked List in groups of a given size
- Write a function to get the intersection point of two linked lists
- Detect a loop in a linked list
- Delete a linked list node at a given position
- Remove duplicates from a sorted linked list
Tree
A Tree is non-linear and a hierarchical data structure consisting of a collection of nodes such that each node of the tree stores a value, a list of references to nodes (the “children”).
- Binary Tree to DLL
- Serialize and Deserialize a Binary Tree
- Level Order Binary Tree Traversal
- Convert a Binary Tree to a Circular Doubly Linked List
- Lowest Common Ancestor in a Binary Tree
- Program to check if a binary tree is BST or not
- Diameter of a Binary Tree
- Check if a binary tree is a subtree of another binary tree
- Given a binary tree, print all root-to-leaf paths
- Inorder Successor in Binary Search Tree
- Connect nodes at the same level using constant extra space
Graph
A Graph is a non-linear data structure consisting of nodes and edges. The nodes are sometimes also referred to as vertices and the edges are lines or arcs that connect any two nodes in the graph.
- Clone an Undirected Graph
- Check whether a given graph is Bipartite or not
- Topological Sorting
- Find the number of islands
- Detect Cycle in a Directed Graph
- Implementing Dijkstra's Algorithm
- Strongly Connected Components (Kosaraju's Algorithm)
- Prerequisite Tasks
- Distance from the Source (Bellman-Ford Algorithm)
- Word Boggle - II
Sorting
Sorting Algorithms is used to rearrange a given array or list of elements according to a comparison operator on the elements.
- Merge Overlapping Intervals
- Sort an array of 0s, 1s and 2s
- Floor in a Sorted Array
- Chocolate Distribution Problem
- K largest(or smallest) elements in an array
- Sort an array according to the order defined by another array
- Overlapping Intervals
- Minimum number of sprinklers required to water the plants
Searching
Searching Algorithms are designed to check for an element or retrieve an element from any data structure where it is stored.
- Key Pair
- Find all triplets with zero sum
- Allocate a minimum number of pages
- Painter’s Partition Problem
- Minimum Number of Platforms Required for a Railway/Bus Station
- The Square Root of an Integer
- Sort an array according to the order defined by another array
- Find the element that appears once
Stack
A Stack is a linear data structure in which elements can be inserted and deleted only from one side of the list, called the top. A stack follows the LIFO (Last In First Out) principle.
- Stock Span Problem
- Sort a stack using recursion
- Implement two stacks in an array
- Length of the longest valid substring
- Next Greater Element
- Maximum size rectangular binary sub-matrix with all 1s
Queue
A Queue is a linear data structure that follows the FIFO principle, where elements are inserted at the rear and removed from the front.
Dynamic Programming
Dynamic Programming is mainly an optimization over plain recursion. Wherever we see a recursive solution that has repeated calls for the same inputs, we can optimize it using Dynamic Programming.
- Count Possible Decodings of a given Digit Sequence
- Maximum size square binary sub-matrix with all 1s
- Stock Buy Sell to Maximize Profit
- Word Break
- Wildcard Pattern Matching
- Maximum size rectangular binary sub-matrix with all 1s
- Painting Fence Algorithm
- Longest Increasing Subsequence
- Count All Palindrome Substrings in a String
- Count ways to reach the nth stair
- Burst Balloon to Maximize Coins
System Design
- System Design is the practice of defining a system’s architecture, components, and interfaces to satisfy end-user requirements, and it plays a critical role in technical interviews. Leading tech companies like Amazon, Google, and Facebook frequently assess candidates on concepts such as scalability, load balancing, and caching.
- This specially crafted System Design Tutorial and System Design Course is designed to help you efficiently learn and master System Design concepts, from fundamentals to advanced levels.
Behavioral Skills
- Many candidates feel anxious about Behavioral interview questions since they are less structured and often outside a Programmer’s comfort zone.
- Unlike technical questions with clear, standard answers, behavioral questions are more open-ended and can feel challenging.