How often are these problems asked?
Frequency scores are based on crowdsourced interview reports. A higher score means the problem has been reported more often in recent Snap interviews.
Very Likely
75-100%
Likely
50-74%
Sometimes
25-49%
Rare
0-24%
Problem database last updated: June 20, 2025
83 problems · 6 Easy, 54 Medium, 23 Hard · Ranked #27 of 458
6 Easy
7% · avg 23%
54 Medium
65% · avg 59%
23 Hard
28% · avg 18%
Based on 83 reported problems, Snap interviews are slightly harder than average - 28% Hard vs 18% across all companies. The majority (65%) of questions are Medium difficulty, which is typical for companies that want to see solid fundamentals without excessive trick questions.
Compared to the industry average, Snap puts unusual emphasis on eulerian-circuit (2.4% of problems, 17.4x the industry average), shortest-path (2.4% of problems, 4.8x the industry average), geometry (2.4% of problems, 4.5x the industry average). If you're short on time, these are the categories to double down on.
The most common topics are array (61.4%), string (31.3%), dynamic-programming (25.3%), hash-table (21.7%). Problems below are sorted by frequency, the ones at the top are asked most often.
| Problem | Difficulty | Frequency | Topics | |
|---|---|---|---|---|
LRU Cache Design a data structure that follows the constraints of a Least Recently Used (LRU) cache. | Medium | Very Likely | hash-tablelinked-listdesign | Solve |
Minimum Window Substring Given two strings s and t of lengths m and n respectively, return the minimum window substring of s such that every character in t (including duplicates) is inc... | Hard | Very Likely | hash-tablestringsliding-window | Solve |
Word Ladder A transformation sequence from word beginWord to word endWord using a dictionary wordList is a sequence of words beginWord -> s1 -> s2 -> ... -> sk such that: | Hard | Very Likely | hash-tablestringbreadth-first-search | Solve |
Making A Large Island You are given an n x n binary matrix grid. You are allowed to change at most one 0 to be 1. | Hard | Very Likely | arraydepth-first-searchbreadth-first-search | Solve |
Word Break II Given a string s and a dictionary of strings wordDict, add spaces in s to construct a sentence where each word is a valid dictionary word. Return all such possi... | Hard | Very Likely | arrayhash-tablestring | Solve |
Course Schedule II There are a total of numCourses courses you have to take, labeled from 0 to numCourses - 1. You are given an array prerequisites where prerequisites[i] = [ai, b... | Medium | Very Likely | depth-first-searchbreadth-first-searchgraph | Solve |
Number of Islands Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands. | Medium | Very Likely | arraydepth-first-searchbreadth-first-search | Solve |
Bus Routes You are given an array routes representing bus routes where routes[i] is a bus route that the ith bus repeats forever. | Hard | Very Likely | arrayhash-tablebreadth-first-search | Solve |
Valid Sudoku Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules: | Medium | Very Likely | arrayhash-tablematrix | Solve |
Min Stack Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. | Medium | Very Likely | stackdesign | Solve |
Power of Two Given an integer n, return true if it is a power of two. Otherwise, return false. | Easy | Very Likely | mathbit-manipulationrecursion | Solve |
Combination Sum II Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers sum to... | Medium | Very Likely | arraybacktracking | Solve |
Frog Jump A frog is crossing a river. The river is divided into some number of units, and at each unit, there may or may not exist a stone. The frog can jump on a stone,... | Hard | Very Likely | arraydynamic-programming | Solve |
Wildcard Matching Given an input string (s) and a pattern (p), implement wildcard pattern matching with support for '?' and '' where: | Hard | Very Likely | stringdynamic-programminggreedy | Solve |
Sudoku Solver Write a program to solve a Sudoku puzzle by filling the empty cells. | Hard | Very Likely | arrayhash-tablebacktracking | Solve |
Burst Balloons You are given n balloons, indexed from 0 to n - 1. Each balloon is painted with a number on it represented by an array nums. You are asked to burst all the ball... | Hard | Very Likely | arraydynamic-programming | Solve |
Bricks Falling When Hit You are given an m x n binary grid, where each 1 represents a brick and 0 represents an empty space. A brick is stable if: | Hard | Very Likely | arrayunion-findmatrix | Solve |
Least Operators to Express Number Given a single positive integer x, we will write an expression of the form x (op1) x (op2) x (op3) x ... where each operator op1, op2, etc. is either addition,... | Hard | Very Likely | mathdynamic-programmingmemoization | Solve |
Combination Sum IV Given an array of distinct integers nums and a target integer target, return the number of possible combinations that add up to target. | Medium | Very Likely | arraydynamic-programming | Solve |
Largest Merge Of Two Strings You are given two strings word1 and word2. You want to construct a string merge in the following way: while either word1 or word2 are non-empty, choose one of t... | Medium | Very Likely | two-pointersstringgreedy | Solve |
Combination Sum Given an array of distinct integers candidates and a target integer target, return a list of all unique combinations of candidates where the chosen numbers sum... | Medium | Very Likely | arraybacktracking | Solve |
Unique Binary Search Trees Given an integer n, return the number of structurally unique BST's (binary search trees) which has exactly n nodes of unique values from 1 to n. | Medium | Very Likely | mathdynamic-programmingtree | Solve |
String Compression Given an array of characters chars, compress it using the following algorithm: | Medium | Very Likely | two-pointersstring | Solve |
Reverse Words in a String Given an input string s, reverse the order of the words. | Medium | Very Likely | two-pointersstring | Solve |
Game of Life According to Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway... | Medium | Very Likely | arraymatrixsimulation | Solve |
Reverse Linked List Given the head of a singly linked list, reverse the list, and return the reversed list. | Easy | Very Likely | linked-listrecursion | Solve |
Remove K Digits Given string num representing a non-negative integer num, and an integer k, return the smallest possible integer after removing k digits from num. | Medium | Very Likely | stringstackgreedy | Solve |
Basic Calculator II Given a string s which represents an expression, evaluate this expression and return its value. | Medium | Very Likely | mathstringstack | Solve |
Shortest Path in a Grid with Obstacles Elimination You are given an m x n integer matrix grid where each cell is either 0 (empty) or 1 (obstacle). You can move up, down, left, or right from and to an empty cell... | Hard | Likely | arraybreadth-first-searchmatrix | Solve |
Cheapest Flights Within K Stops There are n cities connected by some number of flights. You are given an array flights where flights[i] = [fromi, toi, pricei] indicates that there is a flight... | Medium | Likely | dynamic-programmingdepth-first-searchbreadth-first-search | Solve |
Word Search Given an m x n grid of characters board and a string word, return true if word exists in the grid. | Medium | Likely | arraystringbacktracking | Solve |
Decode Ways You have intercepted a secret message encoded as a string of numbers. The message is decoded via the following mapping: | Medium | Likely | stringdynamic-programming | Solve |
Valid Arrangement of Pairs You are given a 0-indexed 2D integer array pairs where pairs[i] = [starti, endi]. An arrangement of pairs is valid if for every index i where 1 <= i < pairs.len... | Hard | Likely | arraydepth-first-searchgraph | Solve |
Best Time to Buy and Sell Stock III You are given an array prices where prices[i] is the price of a given stock on the ith day. | Hard | Likely | arraydynamic-programming | Solve |
Design a Text Editor Design a text editor with a cursor that can do the following: | Hard | Likely | linked-liststringstack | Solve |
Score of Parentheses Given a balanced parentheses string s, return the score of the string. | Medium | Likely | stringstack | Solve |
Minimum Time to Complete All Tasks There is a computer that can run an unlimited number of tasks at the same time. You are given a 2D integer array tasks where tasks[i] = [starti, endi, durationi... | Hard | Likely | arraybinary-searchstack | Solve |
Evaluate Division You are given an array of variable pairs equations and an array of real numbers values, where equations[i] = [Ai, Bi] and values[i] represent the equation Ai /... | Medium | Likely | arraystringdepth-first-search | Solve |
Amount of Time for Binary Tree to Be Infected You are given the root of a binary tree with unique values, and an integer start. At minute 0, an infection starts from the node with value start. | Medium | Likely | hash-tabletreedepth-first-search | Solve |
Insert Delete GetRandom O(1) Implement the RandomizedSet class: | Medium | Likely | arrayhash-tablemath | Solve |
Merge Intervals Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cove... | Medium | Likely | arraysorting | Solve |
Parallel Courses III You are given an integer n, which indicates that there are n courses labeled from 1 to n. You are also given a 2D integer array relations where relations[j] = [... | Hard | Likely | arraydynamic-programminggraph | Solve |
Reconstruct Itinerary You are given a list of airline tickets where tickets[i] = [fromi, toi] represent the departure and the arrival airports of one flight. Reconstruct the itinerar... | Hard | Likely | arraystringdepth-first-search | Solve |
Binary Tree Maximum Path Sum A path in a binary tree is a sequence of nodes where each pair of adjacent nodes in the sequence has an edge connecting them. A node can only appear in the sequ... | Hard | Likely | dynamic-programmingtreedepth-first-search | Solve |
Accounts Merge Given a list of accounts where each element accounts[i] is a list of strings, where the first element accounts[i][0] is a name, and the rest of the elements are... | Medium | Likely | arrayhash-tablestring | Solve |
Shortest Bridge You are given an n x n binary matrix grid where 1 represents land and 0 represents water. | Medium | Likely | arraydepth-first-searchbreadth-first-search | Solve |
Course Schedule There are a total of numCourses courses you have to take, labeled from 0 to numCourses - 1. You are given an array prerequisites where prerequisites[i] = [ai, b... | Medium | Likely | depth-first-searchbreadth-first-searchgraph | Solve |
Max Consecutive Ones III Given a binary array nums and an integer k, return the maximum number of consecutive 1's in the array if you can flip at most k 0's. | Medium | Likely | arraybinary-searchsliding-window | Solve |
Group Anagrams Given an array of strings strs, group the anagrams together. You can return the answer in any order. | Medium | Likely | arrayhash-tablestring | Solve |
Merge Two Sorted Lists You are given the heads of two sorted linked lists list1 and list2. | Easy | Likely | linked-listrecursion | Solve |
Minimum Remove to Make Valid Parentheses Given a string s of '(' , ')' and lowercase English characters. | Medium | Likely | stringstack | Solve |
Top K Frequent Elements Given an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order. | Medium | Likely | arrayhash-tabledivide-and-conquer | Solve |
K Closest Points to Origin Given an array of points where points[i] = [xi, yi] represents a point on the X-Y plane and an integer k, return the k closest points to the origin (0, 0). | Medium | Likely | arraymathdivide-and-conquer | Solve |
Find Peak Element A peak element is an element that is strictly greater than its neighbors. | Medium | Likely | arraybinary-search | Solve |
Product of Array Except Self Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[i]. | Medium | Likely | arrayprefix-sum | Solve |
Edit Distance Given two strings word1 and word2, return the minimum number of operations required to convert word1 to word2. | Medium | Likely | stringdynamic-programming | Solve |
Median of Two Sorted Arrays Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays. | Hard | Likely | arraybinary-searchdivide-and-conquer | Solve |
Jump Game III Given an array of non-negative integers arr, you are initially positioned at start index of the array. When you are at index i, you can jump to i + arr[i] or i... | Medium | Likely | arraydepth-first-searchbreadth-first-search | Solve |
Custom Sort String You are given two strings order and s. All the characters of order are unique and were sorted in some custom order previously. | Medium | Sometimes | hash-tablestringsorting | Solve |
Best Time to Buy and Sell Stock You are given an array prices where prices[i] is the price of a given stock on the ith day. | Easy | Sometimes | arraydynamic-programming | Solve |
Maximum Subarray Given an integer array nums, find the subarray with the largest sum, and return its sum. | Medium | Sometimes | arraydivide-and-conquerdynamic-programming | Solve |
Search a 2D Matrix You are given an m x n integer matrix matrix with the following two properties: | Medium | Sometimes | arraybinary-searchmatrix | Solve |
Search Suggestions System You are given an array of strings products and a string searchWord. | Medium | Sometimes | arraystringbinary-search | Solve |
Longest String Chain You are given an array of words where each word consists of lowercase English letters. | Medium | Sometimes | arrayhash-tabletwo-pointers | Solve |
Car Fleet There are n cars at given miles away from the starting mile 0, traveling to reach the mile target. | Medium | Sometimes | arraystacksorting | Solve |
Minimum Number of Refueling Stops A car travels from a starting position to a destination which is target miles east of the starting position. | Hard | Sometimes | arraydynamic-programminggreedy | Solve |
Knight Dialer The chess knight has a unique movement, it may move two squares vertically and one square horizontally, or two squares horizontally and one square vertically (w... | Medium | Sometimes | dynamic-programming | Solve |
Search a 2D Matrix II Write an efficient algorithm that searches for a value target in an m x n integer matrix matrix. This matrix has the following properties: | Medium | Sometimes | arraybinary-searchdivide-and-conquer | Solve |
Minimum Area Rectangle You are given an array of points in the X-Y plane points where points[i] = [xi, yi]. | Medium | Sometimes | arrayhash-tablemath | Solve |
Design Browser History You have a browser of one tab where you start on the homepage and you can visit another url, get back in the history number of steps or move forward in the hist... | Medium | Sometimes | arraylinked-liststack | Solve |
Longest Increasing Path in a Matrix Given an m x n integers matrix, return the length of the longest increasing path in matrix. | Hard | Sometimes | arraydynamic-programmingdepth-first-search | Solve |
Complement of Base 10 Integer The complement of an integer is the integer you get when you flip all the 0's to 1's and all the 1's to 0's in its binary representation. | Easy | Sometimes | bit-manipulation | Solve |
Random Pick with Weight You are given a 0-indexed array of positive integers w where w[i] describes the weight of the ith index. | Medium | Sometimes | arraymathbinary-search | Solve |
Minimum Cost For Tickets You have planned some train traveling one year in advance. The days of the year in which you will travel are given as an integer array days. Each day is an inte... | Medium | Sometimes | arraydynamic-programming | Solve |
Flip String to Monotone Increasing A binary string is monotone increasing if it consists of some number of 0's (possibly none), followed by some number of 1's (also possibly none). | Medium | Sometimes | stringdynamic-programming | Solve |
Exclusive Time of Functions On a single-threaded CPU, we execute a program containing n functions. Each function has a unique ID between 0 and n-1. | Medium | Sometimes | arraystack | Solve |
Maximum Frequency Stack Design a stack-like data structure to push elements to the stack and pop the most frequent element from the stack. | Hard | Sometimes | hash-tablestackdesign | Solve |
Minimize Result by Adding Parentheses to Expression You are given a 0-indexed string expression of the form "<num1>+<num2>" where <num1> and <num2> represent positive integers. | Medium | Sometimes | stringenumeration | Solve |
Maximize Distance to Closest Person You are given an array representing a row of seats where seats[i] = 1 represents a person sitting in the ith seat, and seats[i] = 0 represents that the ith seat... | Medium | Sometimes | array | Solve |
Movie Rating Table: Movies | Medium | Sometimes | database | Solve |
Verifying an Alien Dictionary In an alien language, surprisingly, they also use English lowercase letters, but possibly in a different order. The order of the alphabet is some permutation of... | Easy | Sometimes | arrayhash-tablestring | Solve |
Reorder Data in Log Files You are given an array of logs. Each log is a space-delimited string of words, where the first word is the identifier. | Medium | Sometimes | arraystringsorting | Solve |
Subarray Sum Equals K Given an array of integers nums and an integer k, return the total number of subarrays whose sum equals to k. | Medium | Sometimes | arrayhash-tableprefix-sum | Solve |
LRU Cache
SolveDesign a data structure that follows the constraints of a Least Recently Used (LRU) cache.
Minimum Window Substring
SolveGiven two strings s and t of lengths m and n respectively, return the minimum window substring of s such that every character in t (including duplicates) is inc...
Word Ladder
SolveA transformation sequence from word beginWord to word endWord using a dictionary wordList is a sequence of words beginWord -> s1 -> s2 -> ... -> sk such that:
Making A Large Island
SolveYou are given an n x n binary matrix grid. You are allowed to change at most one 0 to be 1.
Word Break II
SolveGiven a string s and a dictionary of strings wordDict, add spaces in s to construct a sentence where each word is a valid dictionary word. Return all such possi...
Course Schedule II
SolveThere are a total of numCourses courses you have to take, labeled from 0 to numCourses - 1. You are given an array prerequisites where prerequisites[i] = [ai, b...
Number of Islands
SolveGiven an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands.
Bus Routes
SolveYou are given an array routes representing bus routes where routes[i] is a bus route that the ith bus repeats forever.
Valid Sudoku
SolveDetermine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules:
Min Stack
SolveDesign a stack that supports push, pop, top, and retrieving the minimum element in constant time.
Power of Two
SolveGiven an integer n, return true if it is a power of two. Otherwise, return false.
Combination Sum II
SolveGiven a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers sum to...
Frog Jump
SolveA frog is crossing a river. The river is divided into some number of units, and at each unit, there may or may not exist a stone. The frog can jump on a stone,...
Wildcard Matching
SolveGiven an input string (s) and a pattern (p), implement wildcard pattern matching with support for '?' and '' where:
Sudoku Solver
SolveWrite a program to solve a Sudoku puzzle by filling the empty cells.
Burst Balloons
SolveYou are given n balloons, indexed from 0 to n - 1. Each balloon is painted with a number on it represented by an array nums. You are asked to burst all the ball...
Bricks Falling When Hit
SolveYou are given an m x n binary grid, where each 1 represents a brick and 0 represents an empty space. A brick is stable if:
Least Operators to Express Number
SolveGiven a single positive integer x, we will write an expression of the form x (op1) x (op2) x (op3) x ... where each operator op1, op2, etc. is either addition,...
Combination Sum IV
SolveGiven an array of distinct integers nums and a target integer target, return the number of possible combinations that add up to target.
Largest Merge Of Two Strings
SolveYou are given two strings word1 and word2. You want to construct a string merge in the following way: while either word1 or word2 are non-empty, choose one of t...
Combination Sum
SolveGiven an array of distinct integers candidates and a target integer target, return a list of all unique combinations of candidates where the chosen numbers sum...
Unique Binary Search Trees
SolveGiven an integer n, return the number of structurally unique BST's (binary search trees) which has exactly n nodes of unique values from 1 to n.
String Compression
SolveGiven an array of characters chars, compress it using the following algorithm:
Reverse Words in a String
SolveGiven an input string s, reverse the order of the words.
Game of Life
SolveAccording to Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway...
Reverse Linked List
SolveGiven the head of a singly linked list, reverse the list, and return the reversed list.
Remove K Digits
SolveGiven string num representing a non-negative integer num, and an integer k, return the smallest possible integer after removing k digits from num.
Basic Calculator II
SolveGiven a string s which represents an expression, evaluate this expression and return its value.
Shortest Path in a Grid with Obstacles Elimination
SolveYou are given an m x n integer matrix grid where each cell is either 0 (empty) or 1 (obstacle). You can move up, down, left, or right from and to an empty cell...
Cheapest Flights Within K Stops
SolveThere are n cities connected by some number of flights. You are given an array flights where flights[i] = [fromi, toi, pricei] indicates that there is a flight...
Word Search
SolveGiven an m x n grid of characters board and a string word, return true if word exists in the grid.
Decode Ways
SolveYou have intercepted a secret message encoded as a string of numbers. The message is decoded via the following mapping:
Valid Arrangement of Pairs
SolveYou are given a 0-indexed 2D integer array pairs where pairs[i] = [starti, endi]. An arrangement of pairs is valid if for every index i where 1 <= i < pairs.len...
Best Time to Buy and Sell Stock III
SolveYou are given an array prices where prices[i] is the price of a given stock on the ith day.
Design a Text Editor
SolveDesign a text editor with a cursor that can do the following:
Score of Parentheses
SolveGiven a balanced parentheses string s, return the score of the string.
Minimum Time to Complete All Tasks
SolveThere is a computer that can run an unlimited number of tasks at the same time. You are given a 2D integer array tasks where tasks[i] = [starti, endi, durationi...
Evaluate Division
SolveYou are given an array of variable pairs equations and an array of real numbers values, where equations[i] = [Ai, Bi] and values[i] represent the equation Ai /...
Amount of Time for Binary Tree to Be Infected
SolveYou are given the root of a binary tree with unique values, and an integer start. At minute 0, an infection starts from the node with value start.
Merge Intervals
SolveGiven an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cove...
Parallel Courses III
SolveYou are given an integer n, which indicates that there are n courses labeled from 1 to n. You are also given a 2D integer array relations where relations[j] = [...
Reconstruct Itinerary
SolveYou are given a list of airline tickets where tickets[i] = [fromi, toi] represent the departure and the arrival airports of one flight. Reconstruct the itinerar...
Binary Tree Maximum Path Sum
SolveA path in a binary tree is a sequence of nodes where each pair of adjacent nodes in the sequence has an edge connecting them. A node can only appear in the sequ...
Accounts Merge
SolveGiven a list of accounts where each element accounts[i] is a list of strings, where the first element accounts[i][0] is a name, and the rest of the elements are...
Shortest Bridge
SolveYou are given an n x n binary matrix grid where 1 represents land and 0 represents water.
Course Schedule
SolveThere are a total of numCourses courses you have to take, labeled from 0 to numCourses - 1. You are given an array prerequisites where prerequisites[i] = [ai, b...
Max Consecutive Ones III
SolveGiven a binary array nums and an integer k, return the maximum number of consecutive 1's in the array if you can flip at most k 0's.
Group Anagrams
SolveGiven an array of strings strs, group the anagrams together. You can return the answer in any order.
Merge Two Sorted Lists
SolveYou are given the heads of two sorted linked lists list1 and list2.
Minimum Remove to Make Valid Parentheses
SolveGiven a string s of '(' , ')' and lowercase English characters.
Top K Frequent Elements
SolveGiven an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order.
K Closest Points to Origin
SolveGiven an array of points where points[i] = [xi, yi] represents a point on the X-Y plane and an integer k, return the k closest points to the origin (0, 0).
Find Peak Element
SolveA peak element is an element that is strictly greater than its neighbors.
Product of Array Except Self
SolveGiven an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[i].
Edit Distance
SolveGiven two strings word1 and word2, return the minimum number of operations required to convert word1 to word2.
Median of Two Sorted Arrays
SolveGiven two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays.
Jump Game III
SolveGiven an array of non-negative integers arr, you are initially positioned at start index of the array. When you are at index i, you can jump to i + arr[i] or i...
Custom Sort String
SolveYou are given two strings order and s. All the characters of order are unique and were sorted in some custom order previously.
Best Time to Buy and Sell Stock
SolveYou are given an array prices where prices[i] is the price of a given stock on the ith day.
Maximum Subarray
SolveGiven an integer array nums, find the subarray with the largest sum, and return its sum.
Search a 2D Matrix
SolveYou are given an m x n integer matrix matrix with the following two properties:
Search Suggestions System
SolveYou are given an array of strings products and a string searchWord.
Longest String Chain
SolveYou are given an array of words where each word consists of lowercase English letters.
Car Fleet
SolveThere are n cars at given miles away from the starting mile 0, traveling to reach the mile target.
Minimum Number of Refueling Stops
SolveA car travels from a starting position to a destination which is target miles east of the starting position.
Knight Dialer
SolveThe chess knight has a unique movement, it may move two squares vertically and one square horizontally, or two squares horizontally and one square vertically (w...
Search a 2D Matrix II
SolveWrite an efficient algorithm that searches for a value target in an m x n integer matrix matrix. This matrix has the following properties:
Minimum Area Rectangle
SolveYou are given an array of points in the X-Y plane points where points[i] = [xi, yi].
Design Browser History
SolveYou have a browser of one tab where you start on the homepage and you can visit another url, get back in the history number of steps or move forward in the hist...
Longest Increasing Path in a Matrix
SolveGiven an m x n integers matrix, return the length of the longest increasing path in matrix.
Complement of Base 10 Integer
SolveThe complement of an integer is the integer you get when you flip all the 0's to 1's and all the 1's to 0's in its binary representation.
Random Pick with Weight
SolveYou are given a 0-indexed array of positive integers w where w[i] describes the weight of the ith index.
Minimum Cost For Tickets
SolveYou have planned some train traveling one year in advance. The days of the year in which you will travel are given as an integer array days. Each day is an inte...
Flip String to Monotone Increasing
SolveA binary string is monotone increasing if it consists of some number of 0's (possibly none), followed by some number of 1's (also possibly none).
Exclusive Time of Functions
SolveOn a single-threaded CPU, we execute a program containing n functions. Each function has a unique ID between 0 and n-1.
Maximum Frequency Stack
SolveDesign a stack-like data structure to push elements to the stack and pop the most frequent element from the stack.
Minimize Result by Adding Parentheses to Expression
SolveYou are given a 0-indexed string expression of the form "<num1>+<num2>" where <num1> and <num2> represent positive integers.
Maximize Distance to Closest Person
SolveYou are given an array representing a row of seats where seats[i] = 1 represents a person sitting in the ith seat, and seats[i] = 0 represents that the ith seat...
Verifying an Alien Dictionary
SolveIn an alien language, surprisingly, they also use English lowercase letters, but possibly in a different order. The order of the alphabet is some permutation of...
Reorder Data in Log Files
SolveYou are given an array of logs. Each log is a space-delimited string of words, where the first word is the identifier.
Subarray Sum Equals K
SolveGiven an array of integers nums and an integer k, return the total number of subarrays whose sum equals to k.
Frequency scores are based on crowdsourced interview reports. A higher score means the problem has been reported more often in recent Snap interviews.
Very Likely
75-100%
Likely
50-74%
Sometimes
25-49%
Rare
0-24%
Snap interviews focus heavily on array, string, dynamic-programming problems. If you're short on time, these are the categories to prioritize. The problems on this page are sorted by frequency, so start from the top and work your way down.
Beyond solving problems, practice explaining your approach. Snap interviewers care about your thought process - how you break down a problem, consider edge cases, and evaluate tradeoffs between solutions. A clean O(n) solution you can explain clearly beats an O(log n) solution you can't articulate.
Looking for more companies? Browse all 458 companies in our directory, or sharpen your fundamentals with our free data structure visualizers and AI-powered DSA tutor.
Snap has been reported to ask 83 distinct coding problems. The most common topics are array, string, dynamic-programming. 6 are Easy difficulty, 54 are Medium, and 23 are Hard. Problems are sorted by frequency - the ones at the top are asked most often.
Based on 83 reported problems, Snap interviews are slightly harder than average - 28% Hard vs 18% across all companies. 65% of questions are Medium difficulty. Focus on the high-frequency Medium problems first, then work through the Hard ones.
Start with the highest-frequency problems listed on this page. Focus on the core topics: array, string, dynamic-programming. Practice solving them under time pressure and explaining your approach out loud. Mock interviews with AI can simulate the real experience.
Simulate a real Snap coding interview with an AI interviewer. Get a scorecard with specific feedback on your problem-solving, code quality, and communication.
Simulate a Snap interview with AIarrow_forward